3349 | 2023-02-27 08:39:17 | 4bs0lute0 | Gergő és a sárkány | python3 | Wrong answer 11/100 | 18ms | 14248 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)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 18ms | 10944 KiB | ||||
2 | Accepted | 17ms | 11092 KiB | ||||
subtask2 | 0/8 | ||||||
3 | Accepted | 17ms | 11676 KiB | ||||
4 | Accepted | 17ms | 11476 KiB | ||||
5 | Wrong answer | 17ms | 11872 KiB | ||||
6 | Accepted | 17ms | 11652 KiB | ||||
subtask3 | 0/16 | ||||||
7 | Accepted | 17ms | 12012 KiB | ||||
8 | Wrong answer | 17ms | 12156 KiB | ||||
9 | Accepted | 17ms | 12248 KiB | ||||
10 | Accepted | 17ms | 12144 KiB | ||||
11 | Accepted | 17ms | 12156 KiB | ||||
subtask4 | 0/7 | ||||||
12 | Wrong answer | 17ms | 12588 KiB | ||||
13 | Accepted | 17ms | 12616 KiB | ||||
14 | Accepted | 17ms | 12864 KiB | ||||
subtask5 | 11/11 | ||||||
15 | Accepted | 17ms | 12596 KiB | ||||
16 | Accepted | 17ms | 12948 KiB | ||||
17 | Accepted | 17ms | 12988 KiB | ||||
18 | Accepted | 17ms | 13360 KiB | ||||
subtask6 | 0/58 | ||||||
19 | Accepted | 17ms | 13360 KiB | ||||
20 | Wrong answer | 17ms | 13300 KiB | ||||
21 | Accepted | 17ms | 13268 KiB | ||||
22 | Accepted | 17ms | 13704 KiB | ||||
23 | Accepted | 17ms | 13588 KiB | ||||
24 | Accepted | 17ms | 14040 KiB | ||||
25 | Accepted | 17ms | 14248 KiB | ||||
26 | Accepted | 17ms | 13952 KiB |