QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#522586#9136. Exponent CalculatordefnotmeeAC ✓14ms10768kbPython3344b2024-08-17 03:12:492024-08-17 03:12:49

Judging History

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

  • [2024-08-17 03:12:49]
  • 评测
  • 测评结果:AC
  • 用时:14ms
  • 内存:10768kb
  • [2024-08-17 03:12:49]
  • 提交

answer

import math

resp = []

p = 7

resp.append("$1 = $1 * %.30lf" % (1/2**p))


k = 8

for i in range(k,-1,-1):
    if(i != k):
        resp.append("$0 = $0 * $1")
    resp.append("$0 = $0 + %.30lf" % (1/math.factorial(i)))
    

for i in range(p):
    resp.append("$0 = $0 * $0")

print(len(resp))
for i in resp:
    print(i)

詳細信息

Test #1:

score: 100
Accepted
time: 14ms
memory: 10768kb

input:

input

output:

25
$1 = $1 * 0.007812500000000000000000000000
$0 = $0 + 0.000024801587301587301565789639
$0 = $0 * $1
$0 = $0 + 0.000198412698412698412526317115
$0 = $0 * $1
$0 = $0 + 0.001388888888888888941894328433
$0 = $0 * $1
$0 = $0 + 0.008333333333333333217685101602
$0 = $0 * $1
$0 = $0 + 0.041666666666666664...

result:

ok max relative diff is 2.25525e-11. Checker runtime is 258 ms

Extra Test:

score: 0
Extra Test Passed