結果

問題 No.2724 Coprime Game 1
ユーザー tailstails
提出日時 2024-04-12 22:04:59
言語 cLay
(20240104-1)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 213 bytes
コンパイル時間 2,956 ms
コンパイル使用メモリ 173,916 KB
実行使用メモリ 21,328 KB
最終ジャッジ日時 2024-04-12 22:05:03
合計ジャッジ時間 3,925 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
21,068 KB
testcase_01 AC 24 ms
21,060 KB
testcase_02 AC 23 ms
18,944 KB
testcase_03 AC 25 ms
20,096 KB
testcase_04 AC 30 ms
21,324 KB
testcase_05 AC 28 ms
20,096 KB
testcase_06 AC 27 ms
21,196 KB
testcase_07 AC 30 ms
21,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

int ps[1d6],pm=Prime(3d6,ps);ps[pm]=0;
int pn[3d6+1],j=0;
rep(i,3d6+1){
	if(ps[j]==i){
		++j;
	}
	pn[i]=j;
}
ll@t;
rep(t){
	ll@n;
	if(pn[n]-pn[n-1]){
		wt('P');
	}else{
		n-=pn[n]-pn[n/2];
		wt(n&1?'K':'P');
	}
}
0