Submission #11443853
Source Code Expand
#include <bits/stdc++.h> using namespace std; void factorization(long long n,map<long long ,long long>& mp){ for(int i=2;i<=sqrt(n);i++){ while(n%i==0){ mp[i]++; n/=i; } } if(!(n==1))mp[n]++; } int main() { long long n; cin >> n; map<long long,long long> factor; for(int k=1;k<=n;k++){ factorization(k,factor); } long long ans=1; for(auto i:factor){ ans*=(i.second+1); ans%=1000000007; } cout << ans << endl; }
Submission Info
Submission Time | |
---|---|
Task | C - Factors of Factorial |
User | ekaraage |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 506 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 256 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 | 1 ms | 256 KB |
sample_02.txt | AC | 1 ms | 256 KB |
sample_03.txt | AC | 1 ms | 256 KB |
subtask_1_certain_01.txt | AC | 1 ms | 256 KB |
subtask_1_certain_02.txt | AC | 1 ms | 256 KB |
subtask_1_certain_03.txt | AC | 1 ms | 256 KB |
subtask_1_certain_04.txt | AC | 1 ms | 256 KB |
subtask_1_rand_01.txt | AC | 1 ms | 256 KB |
subtask_1_rand_02.txt | AC | 1 ms | 256 KB |
subtask_1_rand_03.txt | AC | 1 ms | 256 KB |