UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#207542#3741. 算算数wyz_1002ms1196kbC++11410b2024-07-29 13:52:422024-07-29 17:01:48

answer

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

ll x;

ll d(ll x){
	ll ans = 1;
	if(!(x & 1)){
		while(!(x & 1))
			x >>= 1, ans++;
	}
	for(ll i = 3; i * i <= x; i += 2){
		if(x % i == 0){
			int n = 1;
			while(x % i == 0)
				x /= i, n++;
			ans *= n;
		}
	}
	if(x != 1)
		ans <<= 1;
	
	return ans;
}

int main(){
	cin >> x;
	
	cout << d(x);
	
	return 0;
}

详细

小提示:点击横条可展开更详细的信息

Test #1:

score: 10
Accepted
time: 0ms
memory: 1196kb

input:

37

output:

2

result:

ok 1 number(s): "2"

Test #2:

score: 10
Accepted
time: 1ms
memory: 1192kb

input:

97

output:

2

result:

ok 1 number(s): "2"

Test #3:

score: 10
Accepted
time: 0ms
memory: 1196kb

input:

39

output:

4

result:

ok 1 number(s): "4"

Test #4:

score: 10
Accepted
time: 0ms
memory: 1196kb

input:

53

output:

2

result:

ok 1 number(s): "2"

Test #5:

score: 10
Accepted
time: 0ms
memory: 1192kb

input:

92884

output:

12

result:

ok 1 number(s): "12"

Test #6:

score: 10
Accepted
time: 0ms
memory: 1192kb

input:

95508

output:

36

result:

ok 1 number(s): "36"

Test #7:

score: 10
Accepted
time: 0ms
memory: 1196kb

input:

1516247450

output:

12

result:

ok 1 number(s): "12"

Test #8:

score: 10
Accepted
time: 0ms
memory: 1192kb

input:

5637113009

output:

8

result:

ok 1 number(s): "8"

Test #9:

score: 10
Accepted
time: 1ms
memory: 1192kb

input:

4442961915801

output:

12

result:

ok 1 number(s): "12"

Test #10:

score: 10
Accepted
time: 0ms
memory: 1196kb

input:

14937463156896

output:

72

result:

ok 1 number(s): "72"