/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 1ms 328.0 KiB
#2 Wrong Answer 1ms 328.0 KiB

Code

#include <bits/stdc++.h>

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

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:52
Judged At
2024-11-11 03:28:18
Judged By
Score
0
Total Time
1ms
Peak Memory
328.0 KiB