Pagini recente » Cod sursa (job #657811) | Cod sursa (job #3199432) | Cod sursa (job #702653) | Cod sursa (job #2359488) | 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;
}