QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#788465 | #9225. Fibonacci Fusion | ucup-team2179# | RE | 15ms | 10556kb | Python3 | 323b | 2024-11-27 17:02:45 | 2024-11-27 17:02:45 |
Judging History
answer
n = int(input())
arr = []
for i in range(n):
x = int(input())
arr.append(x)
arr.sort()
fib1 = 0
fib2 = 1
fib3 = 1
ans = 0
dict = {}
for x in arr:
while fib3 <= x:
fib1 = fib2
fib2 = fib3
fib3 = fib1 + fib2
value = dict.get(fib3 - x)
if (value != None):
ans = ans + 1
dict[x] = 1
print(ans)
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 15ms
memory: 10556kb
input:
6 50 8 8 5 72 354224848179261915070
output:
4
result:
ok 1 number(s): "4"
Test #2:
score: -100
Dangerous Syscalls
input:
28 200878223506436882933619847964496455022155117513398820563747455993172799881403389571477889821109288771413214004090719097929400406252135763028179112130390003528046316900603668569910008417315162907579003880220844686222148696041857432602133894827753998572080650383305777912447151917272483538029469449...