Cod sursa(job #1891248)
Utilizator | Data | 23 februarie 2017 20:43:10 | |
---|---|---|---|
Problema | Suma divizorilor | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.26 kb |
#include <iostream>
#include <fstream>
#include <cmath>
using namespace std;
int rez, b, e, i, x=1;
int main () {
ifstream fin("sumdiv.in");
ofstream fout("sumdiv.out");
fin >> b >> e;
x = (pow(b,e+1)-1) / (b-1);
fout << x % 9901;
}