Cod sursa(job #1917705)
Utilizator | Data | 9 martie 2017 12:50:54 | |
---|---|---|---|
Problema | Suma divizorilor | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.22 kb |
#include <fstream>
#include<cmath>
using namespace std;
ifstream in("sumdiv.in");
ofstream out("sumdiv.out");
int main()
{
int n,p,x;
in>>n>>p;
x=(pow(n,p+1)-1)/(n-1);
out<<x%9901;
return 0;
}