QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#433853 | #8795. Mysterious Sequence | ucup-team3702# | RE | 8ms | 9568kb | Python3 | 326b | 2024-06-08 13:41:06 | 2024-06-08 13:41:06 |
Judging History
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