/ SeriousOJ /

Record Detail

Compile Error

foo.cc:7:10: fatal error: Ash.cpp: No such file or directory
    7 | #include "Ash.cpp"
      |          ^~~~~~~~~
compilation terminated.

Code

#include <bits/stdc++.h>

#pragma GCC optimize("Ofast")
using namespace std;

#ifndef ONLINE_JUDGE
#include "Ash.cpp"
#else
#define dbg(...)
#define dbgA(...)
#endif

void solve(int cs) {
  int n;
  cin >> n;
  map<int,int> cnt;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    while (x & 1 ^ 1) x >>= 1, cnt[2] += 1;
    for (int i = 3; i * i <= x; i += 2) {
      while (x % i == 0) x /= i, cnt[i] += 1;
    }
    if (x > 1) cnt[x] += 1;
  } 
  int res = 1;
  for (auto &[_, c] : cnt) res = res * 1ll * (c + 1) % int(1e9 + 7);
  cout << res;
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int tc = 1;
  // cin >> tc;
  for (int cs = 1; cs <= tc; cs++) {
    solve(cs);
  }
  return 0;
}

Information

Submit By
Type
Submission
Problem
P1060 Divisor
Language
C++20 (G++ 13.2.0)
Submit At
2024-07-10 09:12:34
Judged At
2024-07-10 09:12:34
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes