Input file: | input.txt | Time limit: | 1 sec | |
Output file: | output.txt | Memory limit: | 256 Mb |
For given integers P and N you need to find all such values of x < 10N, that N last digits of xP are non-zero and equal.
Fortunately, there is not so many numbers showing this property. For example, for P = 2 and N = 2 there exist only 4 of them:
12, 38, 62, 88
Output the number of existing numbers X, then all these numbers in any order.
2 ≤ P ≤ 100
2 ≤ N ≤ 9
No. | Input file (input.txt ) |
Output file (output.txt ) |
---|---|---|
1 |
|
|
Input file: | input.txt | Time limit: | 2 sec | |
Output file: | output.txt | Memory limit: | 4 Mb |
Given the sequence of integers A1, A2, …, AN, find a number As such that there exists exactly one Am > As, and for all k ≠ m Ak ≤ As.
No. | Input file (input.txt ) |
Output file (output.txt ) |
---|---|---|
1 |
|
|
2 |
|
|