Pagini recente » Cod sursa (job #2896435) | Diferente pentru problema/light intre reviziile 10 si 8 | Borderou de evaluare (job #2635220) | Cod sursa (job #2705976) | Cod sursa (job #798766)
Cod sursa(job #798766)
#include<fstream>
#define LL long long
using namespace std;
LL n;
int t;
int main()
{
ifstream f("ssnd.in");
ofstream g("ssnd.out");
f>>t;
for(int i = 1; i <= t; ++i)
{
f>>n;
LL nr = 0;
LL sum = 0;
for(LL j = 1; j <= n; ++j)
if(!(n % j))
{
nr++;
sum += j;
}
g<<nr<<' '<<sum<<'\n';
}
g.close();
return 0;
}