Cod sursa(job #1014250)
Utilizator | Data | 22 octombrie 2013 13:10:50 | |
---|---|---|---|
Problema | Suma si numarul divizorilor | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.33 kb |
#include<iostream>
#include<fstream>
using namespace std;
int main(){
fstream f("ssnd.in");
ofstream o("ssnd.out");
int n=0;f>>n;
while(n--){
int x=0;f>>x;
int s=0;
int k=0;
for(long long j=1;j<=x;j++){
if(x%j==0){
s+=j,
k++,
s=s%9973;
}
}
o<<k<<" "<<s%9973<<endl;
}
return 0;
}