Cod sursa(job #2194271)
| Utilizator | Data | 12 aprilie 2018 18:41:59 | |
|---|---|---|---|
| Problema | Suma si numarul divizorilor | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.62 kb |
#include <iostream>
#include <fstream>
#define modulo 9973
#define nmax 101
using namespace std;
ifstream fin("ssnd.in");
ofstream fout("ssnd.out");
int t,x;
int main()
{
fin>>t;
for(int i =1 ; i <= t; i++)
{
fin>>x;
int nr=0,s=0;
for(long long i = 1; i*i <= x; i++)
{
if(x%i==0)
{
nr++;
s+=i;
s%=modulo;
}
if(i*i!=x)
{
nr++;
s+=x/i;
s%=modulo;
}
}
fout<<nr<<" "<<s<<'\n';
}
}
