Cod sursa(job #2275918)
| Utilizator | Data | 3 noiembrie 2018 19:15:11 | |
|---|---|---|---|
| Problema | Suma si numarul divizorilor | Scor | 0 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.51 kb |
#include <fstream>
using namespace std;
ifstream fin ("sand.in");
ofstream fout("sand.out");
const int modulo = 9973;
int main()
{
int t, x, nr,S;
long long n;
fin >> t;
for (int i = 0;i < t;i ++)
{
fin >> n;
nr = S = 0;
for (long long j = 1;j <= n;j ++)
if ( n % j == 0 )
{
nr ++;
S = S + j;
}
S = S % modulo;
fout << nr << ' ' << S << endl;
}
return 0;
}
