Pagini recente » Diferente pentru onis-2015/solutii-runda-1 intre reviziile 56 si 55 | Diferente pentru home intre reviziile 772 si 771 | Profil liviux | Cod sursa (job #2521768) | Cod sursa (job #848843)
Cod sursa(job #848843)
#include <iostream>
#include <fstream>
using namespace std;
int main ()
{ int s,a,t,b;
ifstream file0;
ofstream file;
file0.open ("suma.txt");
file.open ("suma3.txt" );
file0 >> t;
for ( t;t!=0;t--){
file0 >> a; b=0;s=0;
for (int i=1;i<=a;i++) {
if (a%i==0) { ++b;s=s+i;};}
file << b <<" " << s%9973<<endl;}
return 0;
}