4148 | 2023-03-15 14:56:38 | kristof | Gergő és a sárkány | python3 | Accepted 100/100 | 17ms | 14004 KiB |
N = int(input())
D = int(input())
szam = D
maradek = 0
asd = 0
outlist = []
while szam <= 10**(N) and asd != 2:
tempszam = szam
szam = szam+maradek
maradek = tempszam
if szam >= 10**(N-1) and szam < 10**N:
asd += 1
outlist.append(szam)
if len(outlist) < 2:
print("0 0")
else:
print(f"{outlist[0]} {outlist[1]}")
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 10696 KiB | ||||
2 | Accepted | 17ms | 11088 KiB | ||||
subtask2 | 8/8 | ||||||
3 | Accepted | 17ms | 11676 KiB | ||||
4 | Accepted | 17ms | 11872 KiB | ||||
5 | Accepted | 17ms | 11560 KiB | ||||
6 | Accepted | 17ms | 11800 KiB | ||||
subtask3 | 16/16 | ||||||
7 | Accepted | 17ms | 12004 KiB | ||||
8 | Accepted | 17ms | 12260 KiB | ||||
9 | Accepted | 17ms | 12404 KiB | ||||
10 | Accepted | 17ms | 12900 KiB | ||||
11 | Accepted | 17ms | 12896 KiB | ||||
subtask4 | 7/7 | ||||||
12 | Accepted | 17ms | 12380 KiB | ||||
13 | Accepted | 17ms | 12952 KiB | ||||
14 | Accepted | 17ms | 13168 KiB | ||||
subtask5 | 11/11 | ||||||
15 | Accepted | 17ms | 13264 KiB | ||||
16 | Accepted | 17ms | 13548 KiB | ||||
17 | Accepted | 17ms | 13372 KiB | ||||
18 | Accepted | 17ms | 13544 KiB | ||||
subtask6 | 58/58 | ||||||
19 | Accepted | 17ms | 13664 KiB | ||||
20 | Accepted | 17ms | 13824 KiB | ||||
21 | Accepted | 17ms | 13820 KiB | ||||
22 | Accepted | 17ms | 13920 KiB | ||||
23 | Accepted | 17ms | 13740 KiB | ||||
24 | Accepted | 17ms | 13768 KiB | ||||
25 | Accepted | 17ms | 13836 KiB | ||||
26 | Accepted | 17ms | 14004 KiB |