QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#555190 | #9248. An Easy Math Problem | zhicheng | WA | 0ms | 3648kb | C++14 | 794b | 2024-09-09 20:30:30 | 2024-09-09 20:30:30 |
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-09 20:30:30]
- Submitted
answer
#include<bits/stdc++.h>
#define ll long long
using namespace std;
vector<pair<int,int> >v;
vector<int>pr;
bool vis[100010];
void fun(int n){
for(int i=2;i<=n;i++){
if(!vis[i]){
pr.push_back(i);
}
for(auto j:pr){
if(i*j>n){
break;
}
vis[i*j]=1;
if(i%j==0){
break;
}
}
}
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int q;
ll n,ans,sum;
cin>>q;
while(q--){
cin>>n;
v.clear();
ans=0;
sum=1;
for(auto i:pr){
if(i>n){
break;
}
if(n%i==0){
v.push_back({i,0});
}
while(n%i==0){
v.back().second++;
n/=i;
}
}
if(n>1){
v.push_back({n,1});
}
for(auto i:v){
ans=(ans+(i.second*2)+(ans)*(i.second)*2);
}
cout<<ans/2+1<<endl;
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3648kb
input:
10 1 2 3 4 5 6 7 8 9 10
output:
1 2 2 2 2 2 2 2 2 2
result:
wrong answer 4th lines differ - expected: '3', found: '2'