Submission #1551400


Source Code Expand

Copy
#include<bits/stdc++.h>

using namespace std;

typedef long long int64;
const int64 mod = 1e9 + 7;

int main()
{
  int N;
  cin >> N;

  map< int, int > appear;
  for(int i = 2; i <= N; i++) {
    int base = i;
    for(int j = 2; j * j <= i; j++) {
      while(base % j == 0) {
        base /= j;
        ++appear[j];
      }
    }
    if(base != 1) ++appear[base];
  }

  int64 ret = 1;
  for(auto &p : appear) (ret *= p.second + 1) %= mod;
  cout << ret << endl;
}

Submission Info

Submission Time
Task C - Factors of Factorial
User ei13333
Language C++14 (GCC 5.4.1)
Score 300
Code Size 495 Byte
Status
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample_01.txt, sample_02.txt, sample_03.txt
All 300 / 300 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 1 ms 256 KB
sample_02.txt 1 ms 256 KB
sample_03.txt 1 ms 256 KB
subtask_1_certain_01.txt 1 ms 256 KB
subtask_1_certain_02.txt 1 ms 256 KB
subtask_1_certain_03.txt 1 ms 256 KB
subtask_1_certain_04.txt 1 ms 256 KB
subtask_1_rand_01.txt 1 ms 256 KB
subtask_1_rand_02.txt 1 ms 256 KB
subtask_1_rand_03.txt 1 ms 256 KB