Cod sursa(job #1891230)
| Utilizator | Data | 23 februarie 2017 20:34:22 | |
|---|---|---|---|
| Problema | Suma divizorilor | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.28 kb |
#include <iostream>
#include <fstream>
#include <cmath>
using namespace std;
int rez, b, e, i, x=1;
int main () {
ifstream fin("sumadiv.in");
ofstream fout("sumadiv.out");
fin >> b >> e;
for (i = 1; i <= e+1; i++) x *= b;
fout << (x-1) / (b-1);
}
