Cod sursa(job #1891251)

Utilizator shantih1Alex S Hill shantih1 Data 23 februarie 2017 20:44:40
Problema Suma divizorilor Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.27 kb
#include <iostream>
#include <fstream>
#include <cmath>

using namespace std;

long long 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;
}