33492023-02-27 08:39:174bs0lute0Gergő és a sárkánypython3Wrong answer 11/10018ms14248 KiB
N = int(input())
D = int(input())
p2 = D
p1 = D
while not (p1 >= 10**(N-1) and p2 >= 10**(N-1)):
    p0 = p1 + p2
    p2 = p0 + p1
    p1 = p2 + p0
if p1 == 1 and p2 == 1:
    print(1, 1)
elif p1 == p2:
    print(0, 0)
else:
    print(p1, p2)
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted18ms10944 KiB
2Accepted17ms11092 KiB
subtask20/8
3Accepted17ms11676 KiB
4Accepted17ms11476 KiB
5Wrong answer17ms11872 KiB
6Accepted17ms11652 KiB
subtask30/16
7Accepted17ms12012 KiB
8Wrong answer17ms12156 KiB
9Accepted17ms12248 KiB
10Accepted17ms12144 KiB
11Accepted17ms12156 KiB
subtask40/7
12Wrong answer17ms12588 KiB
13Accepted17ms12616 KiB
14Accepted17ms12864 KiB
subtask511/11
15Accepted17ms12596 KiB
16Accepted17ms12948 KiB
17Accepted17ms12988 KiB
18Accepted17ms13360 KiB
subtask60/58
19Accepted17ms13360 KiB
20Wrong answer17ms13300 KiB
21Accepted17ms13268 KiB
22Accepted17ms13704 KiB
23Accepted17ms13588 KiB
24Accepted17ms14040 KiB
25Accepted17ms14248 KiB
26Accepted17ms13952 KiB