QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#626928 | #9248. An Easy Math Problem | cabbagea# | WA | 53ms | 4716kb | C++17 | 905b | 2024-10-10 14:03:28 | 2024-10-10 14:03:29 |
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-10-10 14:03:28]
- Submitted
answer
#include <bits/stdc++.h>
#define int long long
#define endl "\n"
#define fp fixed << setprecision(20)
using namespace std;
const int N=1e5+10;
vector<int> v; int st[N];
void init(){
for(int i=2;i<1e5+10;i++)
{
if(st[i]) continue;
v.push_back(i);
for(int k=i+i;k<N;k+=i)
st[k]=1;
}
return ;
}
void solve() {
int n;
cin>>n;
vector<int> vv; int Max=0;
for(int i:v)
{
int j=0;
while(n%i==0)
{
n/=i;
j++;
}
Max=max(Max,j);
if(j) vv.push_back(j);
}
int res=1;
for(int i:vv) res=res*(i+1);
if((int)vv.size()>1) res+=Max;
cout<<res<<endl;
}
signed main() {
ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int T=1;
init();
cin>>T;
while(T--) {
solve();
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 2ms
memory: 4448kb
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: 53ms
memory: 4716kb
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:
1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 1025 ...
result:
wrong answer 1st lines differ - expected: '29525', found: '1025'