QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#550589#9248. An Easy Math Problemucup-team4801#WA 571ms3944kbC++14401b2024-09-07 13:32:372024-09-07 13:32:38

Judging History

This is the latest submission verdict.

  • [2024-10-31 22:36:43]
  • hack成功,自动添加数据
  • (/hack/1098)
  • [2024-10-31 22:13:58]
  • hack成功,自动添加数据
  • (/hack/1096)
  • [2024-10-31 22:00:43]
  • hack成功,自动添加数据
  • (/hack/1095)
  • [2024-09-07 13:32:38]
  • Judged
  • Verdict: WA
  • Time: 571ms
  • Memory: 3944kb
  • [2024-09-07 13:32:37]
  • Submitted

answer

#include<bits/stdc++.h>
#define fr(x) freopen(#x".in","r",stdin);freopen(#x".out","w",stdout);
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
#define ll long long
using namespace std;
const int V=1e5;
ll n,ans;
int main(){
    int T;scanf("%d",&T);while(T--){
		scanf("%d",&n);ans=1;
		rep(i,2,V){int c=1;while(!(n%i)) n/=i,c+=2;ans*=c;}
		printf("%lld\n",(ans+1)/2);
    }
    return 0;
}

详细

Test #1:

score: 100
Accepted
time: 3ms
memory: 3908kb

input:

10
1
2
3
4
5
6
7
8
9
10

output:

1
2
2
3
2
5
2
4
3
5

result:

ok 10 lines

Test #2:

score: -100
Wrong Answer
time: 571ms
memory: 3944kb

input:

2000
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
6469693230
646969323...

output:

2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
...

result:

wrong answer 1st lines differ - expected: '29525', found: '2'