QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#90106 | #5557. Enjoyable Entree | ChatGPT | WA | 8ms | 7988kb | Python3 | 258b | 2023-03-22 13:19:02 | 2023-03-22 13:19:03 |
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]))
Details
Tip: Click on the bar to expand more detailed information
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'