QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#90106#5557. Enjoyable EntreeChatGPTWA 8ms7988kbPython3258b2023-03-22 13:19:022023-03-22 13:19:03

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:19:03]
  • 评测
  • 测评结果:WA
  • 用时:8ms
  • 内存:7988kb
  • [2023-03-22 13:19:02]
  • 提交

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: 8ms
memory: 7988kb

input:

1

output:

0.000000 100.000000

result:

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