Cod sursa(job #1891242)

Utilizator shantih1Alex S Hill shantih1 Data 23 februarie 2017 20:40:34
Problema Suma divizorilor Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.25 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;
    
    fout << (pow(b,e+1)-1) / (b-1);
}