QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#90104 | #5557. Enjoyable Entree | ChatGPT | WA | 4ms | 7816kb | Python3 | 258b | 2023-03-22 13:18:12 | 2023-03-22 13:18:16 |
Judging History
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'