QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#529312 | #9136. Exponent Calculator | creatix# | AC ✓ | 6ms | 10496kb | Python3 | 633b | 2024-08-24 11:45:16 | 2024-08-24 11:45:17 |
Judging History
answer
print("25")
def gencode_sime(N, dln) :
step = list({1})
x0, x1, x2 = 0, 1, 0
for i in range(1, N + 5) :
step.append(step[-1] / i)
print(f"$1 = $1 * {1 / 2 ** dln}")
x1 = x1 * (1 / 2 ** dln)
for i in range(N, 1, -1) :
print(f"$0 = $0 + {step[i]}")
print("$0 = $0 * $1")
x0 = x0 + step[i]
x0 = x0 * x1
print("$0 = $0 + 1")
x0 = x0 + 1
print("$0 = $0 * $1")
x0 = x0 * x1
print("$0 = $0 + 1")
x0 = x0 + 1
for i in range(dln) :
print("$0 = $0 * $0")
x0 = x0 * x0
# print(f"e^x: {x0}")
gencode_sime(7, 9)
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 6ms
memory: 10496kb
input:
input
output:
25 $1 = $1 * 0.001953125 $0 = $0 + 0.0001984126984126984 $0 = $0 * $1 $0 = $0 + 0.001388888888888889 $0 = $0 * $1 $0 = $0 + 0.008333333333333333 $0 = $0 * $1 $0 = $0 + 0.041666666666666664 $0 = $0 * $1 $0 = $0 + 0.16666666666666666 $0 = $0 * $1 $0 = $0 + 0.5 $0 = $0 * $1 $0 = $0 + 1 $0 = $0 * $1 $0 ...
result:
ok max relative diff is 1.62383e-13. Checker runtime is 198 ms
Extra Test:
score: 0
Extra Test Passed