結果

問題 No.2725 Coprime Game 2
ユーザー hirakuuuuhirakuuuu
提出日時 2024-04-12 22:38:00
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,116 bytes
コンパイル時間 4,510 ms
コンパイル使用メモリ 274,624 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-12 22:38:07
合計ジャッジ時間 6,034 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, n) for(int i = a; i < n; i++)
#define rrep(i, a, n) for(int i = a; i >= n; i--)
#define inr(l, x, r) (l <= x && x < r)
#define ll long long
#define ld long double
#define pii pair<int, int>
#define pll pair<ll, ll>
// constexpr ll MOD = 1000000007;
constexpr ll MOD = 998244353;
constexpr int IINF = 1001001001;
constexpr ll INF = 9e18;

template<class t,class u> void chmax(t&a,u b){if(a<b)a=b;}
template<class t,class u> void chmin(t&a,u b){if(b<a)a=b;}

ll power(ll a, ll b, ll m=MOD){
    ll res = 1;
    while(b > 0){
        if(b%2 == 1) res = res*a%m;
        a = a*a%m;
        b /= 2;
    }
    return res;
}

int main(){
    int t; cin >> t;
    while(t--){
        ll n; cin >> n;
        if(n == 2){
            cout << "P" << endl;
        }else if(n%2){
            cout << "K" << endl;
        }else if(n%3){
            cout << "K" << endl;
        }else if(n%4){
            cout << "P" << endl;
        }else if(n%5){
            cout << "K" << endl;
        }else{
            cout << "K" << endl;
        }




    }
    return 0;
}
0