Cod sursa(job #2573685)
Utilizator | Data | 5 martie 2020 18:44:10 | |
---|---|---|---|
Problema | Suma si numarul divizorilor | Scor | 60 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.41 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<=sqrt(n);d++)
if (n%d==0)
{
c+=2;
s+=d;
s+=(n/d);
}
out<<c<<" "<<s%9973<<'\n';
}
}