QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#439867 | #6740. Function | suibian_xiaozhao# | WA | 156ms | 21132kb | Python3 | 333b | 2024-06-12 19:54:27 | 2024-06-12 19:54:28 |
Judging History
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'