結果
問題 |
No.2721 "Don't say N" Game
|
ユーザー |
![]() |
提出日時 | 2025-09-09 15:14:46 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 247 ms / 2,000 ms |
コード長 | 479 bytes |
コンパイル時間 | 2,233 ms |
コンパイル使用メモリ | 77,384 KB |
実行使用メモリ | 48,988 KB |
最終ジャッジ日時 | 2025-09-09 15:14:51 |
合計ジャッジ時間 | 4,508 ms |
ジャッジサーバーID (参考情報) |
judge / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 5 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int t = scan.nextInt(); String[] user = {"K","P"}; int turn = 0; // 0:コア 1:パチェ for(int i = 0 ; i < t ; i++){ int n = scan.nextInt(); int count = 0; for(int j = n ; j > 0 ; j--){ if(n%j == 0){ count++; } } System.out.println(user[count % 2]); } } }