Pagini recente » Cod sursa (job #1776012) | Cod sursa (job #1194820) | Cod sursa (job #1863113) | Cod sursa (job #824427) | Cod sursa (job #2275916)
#include <fstream>
using namespace std;
ifstream fin ("sand.in");
ofstream fout("sand.out");
const int modulo = 9973;
int main()
{
int t, n, x, nr;
unsigned long long int S;
fin >> t;
for (int i = 0;i < t;i ++)
{
fin >> n;
nr = S = 0;
for (int j = 1;j <= n;j ++)
if ( n % j == 0 )
{
nr ++;
S = S + j % modulo;
}
S = S % modulo;
fout << nr << ' ' << S << endl;
}
return 0;
}