QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#788490 | #9225. Fibonacci Fusion | ucup-team2179# | RE | 16ms | 10604kb | Python3 | 301b | 2024-11-27 17:09:44 | 2024-11-27 17:09:45 |
Judging History
answer
n = int(input())
arr = []
for i in range(n):
x = int(input())
arr.append(x)
arr.sort()
fib1 = 1
fib2 = 1
ans = 0
dict = {}
for x in arr:
while fib2 <= x:
fib2 = fib1 + fib2
fib1 = fib2 - fib1
val = dict.get(fib2 - x)
if (val != None):
ans = ans + 1
dict[x] = 1
print(ans)
详细
Test #1:
score: 100
Accepted
time: 16ms
memory: 10604kb
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...