Cod sursa(job #1359074)
Utilizator | Data | 24 februarie 2015 21:11:42 | |
---|---|---|---|
Problema | A+B | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.26 kb |
#include <fstream>
using namespace std;
ifstream cin("modulo.in");
ofstream cout("modulo.out");
int main()
{
unsigned int a, b, c, rez=1;
cin>>a>>b>>c;
for(int i=1; i<=b; ++i){
rez=((rez%c)*(a%c))%c;
}
cout<<rez;
return 0;
}