結果

問題 No.2725 Coprime Game 2
ユーザー 沙耶花沙耶花
提出日時 2024-04-12 21:53:11
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 752 bytes
コンパイル時間 4,806 ms
コンパイル使用メモリ 255,548 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-12 21:53:18
合計ジャッジ時間 6,962 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 2 ms
6,816 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 212 ms
6,944 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using mint = modint998244353;
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf32 1000000001
#define Inf64 1000000000000000001

int get(long long n,long long c){
	
	for(long long i=2;i<c;i++){
		if(gcd(c,i)!=1)continue;
		if(n%i==0)continue;
		if(get(n,i)==0)return 1;
	}
	return 0;
}

int main(){
	/*
	for(long long i=2;i<=2000;i++){
		if(get(i,i)==0){
			if(i%12!=6)cout<<'a'<<i<<endl;
		}
		else{
			if(i%12==6)cout<<'b'<<i<<endl;
		}
		
		//if(get(i,i)==0)cout<<i<<endl;
	}
	*/
	int _t;
	cin>>_t;
	rep(_,_t){
		long long n;
		cin>>n;
		if(n==2 || n%12==6 || n%420==0)cout<<"P"<<endl;
		else cout<<"K"<<endl;
	}
	
	return 0;
}
0