QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#433919#8795. Mysterious Sequenceucup-team3702#WA 8ms9480kbPython3300b2024-06-08 13:53:192024-06-08 13:53:21

Judging History

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

  • [2024-06-08 13:53:21]
  • 评测
  • 测评结果:WA
  • 用时:8ms
  • 内存:9480kb
  • [2024-06-08 13:53:19]
  • 提交

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(x)

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 8ms
memory: 9480kb

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.3235294117647059
0.6764705882352942
0.35294117647058826
1.0294117647058825
1.3823529411764708
2.4117647058823533
3.7941176470588243
6.2058823529411775
10.000000000000002

result:

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