QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#55461 | #2965. RSA Mistake | SayedHassan# | WA | 2ms | 3708kb | C++ | 1.0kb | 2022-10-13 20:53:13 | 2022-10-13 20:53:14 |
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<ll> solve(int x)
{
vector<ll> 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()
{
ll n,m;
cin>>n>>m;
vector<ll> 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;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3608kb
input:
13 23
output:
full credit
result:
ok single line: 'full credit'
Test #2:
score: 0
Accepted
time: 2ms
memory: 3656kb
input:
35 6
output:
partial credit
result:
ok single line: 'partial credit'
Test #3:
score: 0
Accepted
time: 2ms
memory: 3652kb
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: 2ms
memory: 3704kb
input:
15 21
output:
no credit
result:
ok single line: 'no credit'
Test #6:
score: 0
Accepted
time: 2ms
memory: 3612kb
input:
545528636581 876571629707
output:
no credit
result:
ok single line: 'no credit'
Test #7:
score: 0
Accepted
time: 2ms
memory: 3524kb
input:
431348146441 3
output:
no credit
result:
ok single line: 'no credit'
Test #8:
score: 0
Accepted
time: 2ms
memory: 3708kb
input:
584803025179 200560490130
output:
partial credit
result:
ok single line: 'partial credit'
Test #9:
score: -100
Wrong Answer
time: 2ms
memory: 3628kb
input:
725769156026 520807975733
output:
no credit
result:
wrong answer 1st lines differ - expected: 'partial credit', found: 'no credit'