Submission #3000183
Source Code Expand
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define f first #define s second #define int long long typedef long long ll; typedef pair<int,int>pii; #define MAXN 11234567890123 #define INF INT_MAX/2 #define MOD 1000000007 int m[112345]; void ft(int n){ for(int i=2;i*i<=n;i++){ while(n%i==0){ m[i]++; n=n/i; } } m[n]++; } int32_t main(){ ios::sync_with_stdio(false); cin.tie(0); cout.precision(1); cout.setf(ios::fixed); int n; cin>>n; for(int i=2;i<=n;i++){ ft(i); } int resp=1; for(int i=2;i<=n;i++){ resp*=m[i]+1; resp%=MOD; } cout<<resp<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Factors of Factorial |
User | vjudge2 |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 761 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 |