Submission #11330108
Source Code Expand
#include <iostream> using namespace std; long long power(long long a,long long n) { long long x; if(n==0)return 1; else if(n%2==1) { x=(n-1)/2; return power(a,x)*power(a,x)*a; } else { x=n/2; return power(a,x)*power(a,x); } } int main() { long long i,j,p,k; cin>>i>>j>>p; k=power(i,j); cout<<k%pendl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - n^p mod m |
User | luogu_bot2 |
Language | C++ (GCC 5.4.1) |
Score | 0 |
Code Size | 439 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:28:13: error: ‘pendl’ was not declared in this scope cout<<k%pendl; ^