[ create a new paste ] login | about

Link: http://codepad.org/gzii9MNw    [ raw code | output | fork ]

C++, pasted on Jul 30:
#include<bits/stdc++.h>
using namespace std;
#define ll long long int

ll bigmod(ll b,ll p){
    if(p==0){
        return 1;
    }
    ll ans=bigmod(b,p/2);
    ans=(ans*ans)%100;
    if(p&1){
        ans=(ans*b)%100;
    }
    return ans;
}

int main(){
    ll a,b,p;
    scanf("%lld %lld",&b,&p);
    a=bigmod(b,p);
    printf("%lld\n",a%100);
    return 0;
}


Output:
1
2
3
Line 23: error: bits/stdc++.h: No such file or directory
Line 5: error: ISO C++ does not support 'long long'
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: