Submission #16786330


Source Code Expand

Copy
N=int(input())
table=[True for _ in range(N+1)]
table[0]=False
table[1]=False
for i in range(2,N+1):
    if table[i]==False:
        continue
    for j in range(2,N//i):
        table[i*j]=False
p=[]
for i in range(N+1):
    if table[i]:
        p.append(i)

n=len(p)
cnt=[0 for _ in range(n)]
for i in range(2,N+1):
    x=i
    j=0
    while x>1:
        while x%p[j]==0:
            cnt[j]+=1
            x//=p[j]
        j+=1
ans=1
MOD=1000000007
for i in range(n):
    ans*=cnt[i]+1
    ans%=MOD
print(ans)

Submission Info

Submission Time
Task C - Factors of Factorial
User monnu
Language Python (3.8.2)
Score 300
Code Size 541 Byte
Status AC
Exec Time 33 ms
Memory 9220 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 10
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All sample_01.txt, sample_02.txt, sample_03.txt, subtask_1_certain_01.txt, subtask_1_certain_02.txt, subtask_1_certain_03.txt, subtask_1_certain_04.txt, subtask_1_rand_01.txt, subtask_1_rand_02.txt, subtask_1_rand_03.txt
Case Name Status Exec Time Memory
sample_01.txt AC 18 ms 8920 KB
sample_02.txt AC 20 ms 8928 KB
sample_03.txt AC 31 ms 8920 KB
subtask_1_certain_01.txt AC 16 ms 9032 KB
subtask_1_certain_02.txt AC 20 ms 9220 KB
subtask_1_certain_03.txt AC 33 ms 9084 KB
subtask_1_certain_04.txt AC 31 ms 9160 KB
subtask_1_rand_01.txt AC 26 ms 9156 KB
subtask_1_rand_02.txt AC 23 ms 8916 KB
subtask_1_rand_03.txt AC 24 ms 8988 KB