Cod sursa(job #1589492)
Utilizator | Data | 4 februarie 2016 01:21:34 | |
---|---|---|---|
Problema | Suma divizorilor | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.33 kb |
#include <fstream>
#include<string.h>
using namespace std;
ifstream in("sumdiv.in");
ofstream out("sumdiv.out");
int main()
{
int a, b, s, d, sd, k, p;
in>>a>>b;
p=a^b;
s=0;
d=2;
while(d<=p/2)
{
if(p%d==0)s+=d;
d++;
}
s+=1+p;
k=p%9901;
out<<k;
return 0;
}