蒟蒻求助:为什么只AC了11,12,13,14四个点

P1593 因子和

Algorithm_ZRF @ 2023-07-31 20:39:50

#include<bits/stdc++.h>
using namespace std;
long long a,b,c,d;
inline void input() {
    cin >> a >> b;
}

inline void compute(){
    c = 1;
    d = a;
    for (int i = 2;i <= b;++i){
        c += a % 9901;
        a *= d;
    }
    c += a % 9901;
    c = c % 9901;
    cout << c;
}   
int main() {
    input();
    compute();
    return 0;
}

by DAKnell @ 2024-08-07 18:03:45

a不一定是质数


|