loj#P3480. 「ROIR 2021 Day 2」A+B
「ROIR 2021 Day 2」A+B
Description
Translated from ROIR 2021 Day2 T4 A+B on this website.
There are three integers with length which may consist of prefix zeros with the following layout that has three lines and columns.
a
b
c
Your task is to find the number of ways arranging the columns in which the three integers horizontally read satisfies that and that all those numbers have no prefix zeros.
Since it is possible that large amount of solutions exist, it is only required to output the number of solutions .
Input Format
Three lines with each line consists of an integer of length .
Output Format
The number of solutions .
123
123
246
6
01
02
03
1
01211
12099
23300
4
121
214
999
0
Constraints
For all test data, it is guaranteed that .
Subtask # | Additional Constraints | Score |
---|---|---|
, with no in numbers | ||
, with no in numbers | ||
There are no in numbers | ||
No Additional Constraints |