Skip to content

Latest commit

 

History

History
20 lines (18 loc) · 365 Bytes

372.md

File metadata and controls

20 lines (18 loc) · 365 Bytes

没啥好说的,时刻注意溢出吧


int poww(int a, int b){
    int ans = 1;
    for(int i = 0; i < b; ++i){
        ans *= (a%1337);
        ans %= 1337;
    }
    return ans%1337;
}
int superPow(int a, int* b, int bSize) {
    int ans = 1;
    for(int i = 0; i < bSize; ++i){
        ans = poww(ans, 10) * poww(a,b[i]);
    }
    return ans%1337;
}