QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#433853#8795. Mysterious Sequenceucup-team3702#RE 8ms9568kbPython3326b2024-06-08 13:41:062024-06-08 13:41:06

Judging History

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

  • [2024-06-08 13:41:06]
  • 评测
  • 测评结果:RE
  • 用时:8ms
  • 内存:9568kb
  • [2024-06-08 13:41:06]
  • 提交

answer

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

x, y = s, (t - x[n - 1][0] * s) / x[n - 1][1]
print("{:.12f}\n{:.12f}".format(x, y))
for i in range(2, n):
    print(round(x + y, 12))
    x, y = y, x + y

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 9512kb

input:

1.0 1.0 10 1 10

output:

1.000000000000
-0.323529411765
0.676470588235
0.352941176471
1.029411764706
1.382352941176
2.411764705882
3.794117647059
6.205882352941
10.0

result:

ok 10 numbers

Test #2:

score: 0
Accepted
time: 8ms
memory: 9480kb

input:

1 1 2 1 100

output:

1.000000000000
100.000000000000

result:

ok 2 numbers

Test #3:

score: 0
Accepted
time: 4ms
memory: 9568kb

input:

1 1 5 50 100

output:

50.000000000000
0.000000000000
50.0
50.0
100.0

result:

ok 5 numbers

Test #4:

score: -100
Dangerous Syscalls

input:

0.25 0.25 10 1 1

output:


result: