Cod sursa(job #2573669)
Utilizator | Data | 5 martie 2020 18:37:23 | |
---|---|---|---|
Problema | Suma si numarul divizorilor | Scor | 20 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.38 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream in("ssnd.in");
ofstream out("ssnd.out");
int main()
{
long long n,i,t,c=0,s=0;
in>>t;
while (t--)
{
in>>n;
c=0;
s=0;
for (int d=1;d<=n;d++)
if (n%d==0)
{
c++;
s+=d;
}
out<<c<<" "<<s%9973<<'\n';
}
}