Cod sursa(job #2194270)
Utilizator | Data | 12 aprilie 2018 18:40:29 | |
---|---|---|---|
Problema | Suma si numarul divizorilor | Scor | 20 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.47 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 <= x; i++)
if(x%i==0)
{
nr++;
s+=i;
s%=modulo;
}
fout<<nr<<" "<<s<<'\n';
}
}