QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#55460 | #2965. RSA Mistake | SayedHassan# | WA | 2ms | 3692kb | C++ | 1.1kb | 2022-10-13 20:51:53 | 2022-10-13 20:51:54 |
Judging History
answer
#pragma GCC optimize("O3")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("avx,avx2,fma")
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fi first
#define sc second
vector<int> solve(int x)
{
vector<int> v;
for(ll i=2;i*i<=x;i++)
{
while(x%i==0)
{
v.push_back(i);
x/=i;
}
}
if(x!=1)v.push_back(x);
return v;
}
map<ll,int> f;
int main()
{
int n,m;
cin>>n>>m;
vector<int> v1=solve(n),v2=solve(m);
if(v1.size()==1&&v2.size()==1&&n!=m)
{
cout<<"full credit";
}
else
{
for(auto x:v1)
{
if(f[x])
{
cout<<"no credit";
return 0;
}
f[x]++;
}
for(auto x:v2)
{
if(f[x])
{
cout<<"no credit";
return 0;
}
f[x]++;
}
cout<<"partial credit";
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 2ms
memory: 3612kb
input:
13 23
output:
full credit
result:
ok single line: 'full credit'
Test #2:
score: 0
Accepted
time: 2ms
memory: 3544kb
input:
35 6
output:
partial credit
result:
ok single line: 'partial credit'
Test #3:
score: 0
Accepted
time: 2ms
memory: 3692kb
input:
4 5
output:
no credit
result:
ok single line: 'no credit'
Test #4:
score: 0
Accepted
time: 2ms
memory: 3596kb
input:
17 17
output:
no credit
result:
ok single line: 'no credit'
Test #5:
score: 0
Accepted
time: 1ms
memory: 3544kb
input:
15 21
output:
no credit
result:
ok single line: 'no credit'
Test #6:
score: -100
Wrong Answer
time: 2ms
memory: 3600kb
input:
545528636581 876571629707
output:
partial credit
result:
wrong answer 1st lines differ - expected: 'no credit', found: 'partial credit'