QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#131079 | #2965. RSA Mistake | chu_shi | WA | 1ms | 3644kb | C++14 | 811b | 2023-07-26 09:46:37 | 2023-07-26 09:46:39 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define x first
#define y second
#define int long long
#define ios ios::sync_with_stdio(0)
__int128 n,m;
typedef pair<int,int> pll;
const int N=2e6+10,inf=0x3f3f3f3f;
//int n,m;
int a[N];
bool check(int n)
{
if(n==1) return 0;
for(int i=2;i<=n/i;i++)
{
if(n%i==0) return 0;
}
return 1;
}
void solve()
{
scanf("%lld%lld",&n,&m);
int f=check(n);
int d=check(m);
if(f&&d&&n!=m) cout<<"full credit"<<endl;
else
{
int ff=0;
for(int i=2;i*i<=n*m;i++)
if((n*m)%(i*i)==0){
ff=1;
break;
}
if(ff) cout<<"no credit"<<endl;
else cout<<"pertial credit"<<endl;
}
}
signed main()
{
// ios;
// cin.tie(0);
// cout.tie(0);
int T=1;
// cin>>T;
while(T--)
{
solve();
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3572kb
input:
13 23
output:
full credit
result:
ok single line: 'full credit'
Test #2:
score: -100
Wrong Answer
time: 1ms
memory: 3644kb
input:
35 6
output:
pertial credit
result:
wrong answer 1st lines differ - expected: 'partial credit', found: 'pertial credit'