QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#529298#9136. Exponent Calculatorcreatix#WA 12ms10544kbPython3621b2024-08-24 11:34:022024-08-24 11:34:02

Judging History

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

  • [2024-08-24 11:34:02]
  • 评测
  • 测评结果:WA
  • 用时:12ms
  • 内存:10544kb
  • [2024-08-24 11:34:02]
  • 提交

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(8, 7)

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 12ms
memory: 10544kb

input:

input

output:

$1 = $1 * 0.0078125
$0 = $0 + 2.48015873015873e-05
$0 = $0 * $1
$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...

result:

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