/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Wrong Answer 50ms 788.0 KiB
#2 Wrong Answer 57ms 628.0 KiB
#3 Wrong Answer 74ms 848.0 KiB
#4 Wrong Answer 84ms 632.0 KiB
#5 Wrong Answer 154ms 5.242 MiB
#6 Wrong Answer 130ms 560.0 KiB
#7 Wrong Answer 93ms 976.0 KiB
#8 Wrong Answer 298ms 556.0 KiB
#9 Wrong Answer 90ms 796.0 KiB
#10 Wrong Answer 395ms 2.547 MiB
#11 Time Exceeded ≥1099ms ≥2.527 MiB

Code

#define _GLIBCXX_FILESYSTEM
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int N = 1e7+2,mod = 1e9+7;

int cnt[N];
void solve() {
    int n;
    cin >> n;
    for(int i = 0; i < n; i++) {
        int x;
        cin >> x;
        for(int j = 2; j * j <= x; j++) {
            if(x % j == 0) {
                while(x % j == 0) x /= j, cnt[j]++;
            }
        }
        if(x > 1) cnt[x]++;
    }
    ll ans = 1;
    for(int i = 2; i < N; i++) {
        ans *= 1ll * (cnt[i]+1);
        ans %= mod;
    }
    cout << ans;
    return;
}

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

Information

Submit By
Type
Submission
Problem
P1060 Divisor
Language
C++20 (G++ 13.2.0)
Submit At
2024-08-16 12:18:25
Judged At
2024-08-16 12:18:25
Judged By
Score
0
Total Time
≥1099ms
Peak Memory
≥5.242 MiB