Submission #2063342
Source Code Expand
def prime_decomposition(n): # nを素因数分解 from collections import defaultdict i = 2 table = defaultdict(int) while i**2 <= n: while n % i == 0: n //= i table[i]+=1 i += 1 if n > 1: table[n]+=1 return table import math N = int(input()) c = prime_decomposition(math.factorial(N)) ans = 1 for k, v in c.items(): ans = (ans * (v + 1)) % (10**9 + 7) print(ans)
Submission Info
Submission Time | |
---|---|
Task | C - Factors of Factorial |
User | kenseiQ |
Language | Python (3.4.3) |
Score | 300 |
Code Size | 464 Byte |
Status | AC |
Exec Time | 38 ms |
Memory | 3700 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
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 | 30 ms | 3700 KB |
sample_02.txt | AC | 21 ms | 3316 KB |
sample_03.txt | AC | 38 ms | 3316 KB |
subtask_1_certain_01.txt | AC | 20 ms | 3316 KB |
subtask_1_certain_02.txt | AC | 21 ms | 3316 KB |
subtask_1_certain_03.txt | AC | 38 ms | 3316 KB |
subtask_1_certain_04.txt | AC | 38 ms | 3316 KB |
subtask_1_rand_01.txt | AC | 25 ms | 3316 KB |
subtask_1_rand_02.txt | AC | 26 ms | 3316 KB |
subtask_1_rand_03.txt | AC | 23 ms | 3316 KB |