QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#439867#6740. Functionsuibian_xiaozhao#WA 156ms21132kbPython3333b2024-06-12 19:54:272024-06-12 19:54:28

Judging History

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

  • [2024-06-12 19:54:28]
  • 评测
  • 测评结果:WA
  • 用时:156ms
  • 内存:21132kb
  • [2024-06-12 19:54:27]
  • 提交

answer

import sys
input = lambda: sys.stdin.readline().strip()
from functools import lru_cache

n = int(input())
@lru_cache(None)
def f(x):
    if x > n:
        return 0
    res = 1
    for k in range(2, 10 ** 5):
        if k * x > n:
            break
        res += f(k * x)
    return res

res = f(1)
del f
print(res)

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 7ms
memory: 10576kb

input:

1

output:

1

result:

ok 1 number(s): "1"

Test #2:

score: 0
Accepted
time: 14ms
memory: 10628kb

input:

2

output:

2

result:

ok 1 number(s): "2"

Test #3:

score: 0
Accepted
time: 9ms
memory: 10620kb

input:

100

output:

949

result:

ok 1 number(s): "949"

Test #4:

score: 0
Accepted
time: 14ms
memory: 10636kb

input:

10

output:

19

result:

ok 1 number(s): "19"

Test #5:

score: 0
Accepted
time: 5ms
memory: 10652kb

input:

1000

output:

48614

result:

ok 1 number(s): "48614"

Test #6:

score: 0
Accepted
time: 19ms
memory: 11248kb

input:

10000

output:

2602393

result:

ok 1 number(s): "2602393"

Test #7:

score: -100
Wrong Answer
time: 156ms
memory: 21132kb

input:

100000

output:

139804053

result:

wrong answer 1st numbers differ - expected: '139804054', found: '139804053'