QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#433925#8795. Mysterious Sequenceucup-team3702#WA 15ms10588kbPython3310b2024-06-08 13:53:552024-06-08 13:53:59

Judging History

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

  • [2024-06-08 13:53:59]
  • 评测
  • 测评结果:WA
  • 用时:15ms
  • 内存:10588kb
  • [2024-06-08 13:53:55]
  • 提交

answer

a, b, n, s, t = map(eval, input().split())
x = [(1, 0), (0, 1)]
for i in range(2, n):
    x.append(tuple(a * p + b * q for p, q in zip(x[i - 1], x[i - 2])))
print(x)

f = [s, (t - x[n - 1][0] * s) / x[n - 1][1]]
for i in range(2, n): f.append(a * f[i - 1] + b * f[i - 2])
for x in f: print(round(x, 8))

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 15ms
memory: 10588kb

input:

1.0 1.0 10 1 10

output:

[(1, 0), (0, 1), (1.0, 1.0), (1.0, 2.0), (2.0, 3.0), (3.0, 5.0), (5.0, 8.0), (8.0, 13.0), (13.0, 21.0), (21.0, 34.0)]
1
-0.32352941
0.67647059
0.35294118
1.02941176
1.38235294
2.41176471
3.79411765
6.20588235
10.0

result:

wrong output format Expected double, but "[(1," found