QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#529309#9136. Exponent Calculatorcreatix#WA 15ms10484kbPython3621b2024-08-24 11:40:102024-08-24 11:40:10

Judging History

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

  • [2024-08-24 11:40:10]
  • 评测
  • 测评结果:WA
  • 用时:15ms
  • 内存:10484kb
  • [2024-08-24 11:40:10]
  • 提交

answer

def gencode_sime(N, dln) :
    step = list({1})
    x0, x1, x2 = 0, 20, 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, 8)

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 15ms
memory: 10484kb

input:

input

output:

$1 = $1 * 0.00390625
$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 = $0...

result:

wrong output format Expected integer, but "$1" found