arrow_forward
همه ارسالها
جزئیات ارسال کد#594
برای پسندیدن وارد شوید
1#include <iostream>
2#include <math.h>
3using namespace std;
4int main()
5{
6 int x; cin >> x;
7 int a = 2;
8 int counter = 1;
9 int b = sqrt (x);
10
11 while ( a <= b )
12 {
13 if ( x % a == 0 )
14 {
15 counter ++;
16 x = x / a;
17 }
18
19 else
20 {
21 a ++;
22 }
23 }
24
25 if ( counter == 1 )
26 {
27 counter ++;
28 }
29
30 cout << counter;
31
32 return 0;
33}
کد ارسالشده برای داوری خودکار هاتکدز
UTF-8