Submission #6853049


Source Code Expand

#include<bits/stdc++.h>
#define ull unsigned long long
using namespace std;
ull n,p,m;
ull mi(ull x)
{
    if(x==0) return 1;
    ull mix=mi(x/2);
    if(x%2==1) return mix%m*mix%m*n%m;
    return mix%m*ss%m;
}
int main()
{
    cin>>n>>m>>p;
    cout<<mi(p)%m<<endl;
    return 0;
}

Submission Info

Submission Time
Task B - n^p mod m
User luogu_bot4
Language C++ (GCC 5.4.1)
Score 0
Code Size 298 Byte
Status CE

Compile Error

./Main.cpp: In function ‘long long unsigned int mi(long long unsigned int)’:
./Main.cpp:10:18: error: ‘ss’ was not declared in this scope
     return mix%m*ss%m;
                  ^