QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#90104#5557. Enjoyable EntreeChatGPTWA 4ms7816kbPython3258b2023-03-22 13:18:122023-03-22 13:18:16

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-22 13:18:16]
  • 评测
  • 测评结果:WA
  • 用时:4ms
  • 内存:7816kb
  • [2023-03-22 13:18:12]
  • 提交

answer

n = int(input())

# base cases
pi = [100, 0]
tau = [0, 100]

# dynamic programming
for i in range(2, n+1):
    pi.append(0.5 * pi[i-1] + 0.5 * pi[i-2])
    tau.append(0.5 * tau[i-1] + 0.5 * tau[i-2])

print('{:.6f} {:.6f}'.format(pi[n], tau[n]))

详细

Test #1:

score: 0
Wrong Answer
time: 4ms
memory: 7816kb

input:

1

output:

0.000000 100.000000

result:

wrong answer 1st numbers differ - expected: '100.0000000', found: '0.0000000', error = '1.0000000'