QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#788490#9225. Fibonacci Fusionucup-team2179#RE 16ms10604kbPython3301b2024-11-27 17:09:442024-11-27 17:09:45

Judging History

你现在查看的是最新测评结果

  • [2024-11-27 17:09:45]
  • 评测
  • 测评结果:RE
  • 用时:16ms
  • 内存:10604kb
  • [2024-11-27 17:09:44]
  • 提交

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...

output:


result: