QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#568033 | #9248. An Easy Math Problem | lytqwq# | WA | 108ms | 5564kb | C++14 | 519b | 2024-09-16 15:00:45 | 2024-09-16 15:00:46 |
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-16 15:00:45]
- Submitted
answer
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define int ll
const int N=200010;
int a[N],b[N],p;
int q;
ll n;
signed main(){
for(int i=2;i<N;i++){
if(a[i]==0){
b[++p]=i;
}
for(int v=1;v<=p&&b[v]*i<N;v++){
a[b[v]*i]=1;
if(i%b[v]==0)break;
}
}
scanf("%lld",&q);
while(q--){
scanf("%lld",&n);
ll ans=1;
for(int i=1;i<=p;i++){
int num=0;
while(n%b[i]==0){
n/=b[i];
num++;
}
ans*=(1+num*2);
}
cout<<(ans+1)/2<<endl;
}
}
詳細信息
Test #1:
score: 100
Accepted
time: 2ms
memory: 5508kb
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: 0
Accepted
time: 104ms
memory: 5508kb
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:
29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 29525 ...
result:
ok 2000 lines
Test #3:
score: -100
Wrong Answer
time: 108ms
memory: 5564kb
input:
2000 1763047095 79735483 1016286871 2864801397 2327774116 2668010360 3469893354 3634459021 1613699068 781737219 574741575 2763134701 1458502604 1822260248 2281150332 2924219311 2493931196 3735904708 158802001 2006921221 729928782 1974841034 727412600 2873393292 1291087179 2741607663 1893408215 29827...
output:
5 5 1 2 8 95 23 14 3 68 203 5 8 32 13 41 3 3 14 1 608 41 158 113 8 41 5 2 5 41 5 203 41 5 6 446 2 18 59 878 1 5 365 203 5 68 1 122 32 95 41 14 2 23 5 14 2 2 5 122 8 203 608 8 41 122 1 5 32 1 68 41 68 5 230 41 23 8 17 5 11 14 3 2 2 2 68 68 41 293 473 2 14 41 14 1 5 5 2 1 122 41 11 23 5 1 14 2 14 14 8...
result:
wrong answer 1st lines differ - expected: '14', found: '5'