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