QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#131079#2965. RSA Mistakechu_shiWA 1ms3644kbC++14811b2023-07-26 09:46:372023-07-26 09:46:39

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-26 09:46:39]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3644kb
  • [2023-07-26 09:46:37]
  • 提交

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'