include iostream include cmath using namespace std int main int cin wh

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int n;
//cin >> n;
//while(n!=0)
for (int n=0;n<40;n++)
{
int s=0;
int i =0;
while(i*i <=n)
{
if(n % i == 0)
{
ans++;
n/=i;
}
else
{
i++;
}
}
/*if(i >= 100000)
break;*/
/*if (n % 2 == 1)
s++;
int r =int(sqrt(double(8*n + 1)));
if (r*r == 8*n+1)
s--;
s--;*/
cout << n << ' ' << s << endl;
//cin >> n;
}
return 0;
}