結果

問題 No.2723 Fortune-telling by Flowers
ユーザー 👑 hitonanodehitonanode
提出日時 2024-04-12 22:43:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 217 ms / 2,000 ms
コード長 210 bytes
コンパイル時間 345 ms
コンパイル使用メモリ 82,424 KB
実行使用メモリ 101,848 KB
最終ジャッジ日時 2024-04-12 22:43:33
合計ジャッジ時間 2,867 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,920 KB
testcase_01 AC 89 ms
76,740 KB
testcase_02 AC 137 ms
76,780 KB
testcase_03 AC 177 ms
81,768 KB
testcase_04 AC 217 ms
81,716 KB
testcase_05 AC 64 ms
71,956 KB
testcase_06 AC 115 ms
93,776 KB
testcase_07 AC 123 ms
101,848 KB
testcase_08 AC 119 ms
101,556 KB
testcase_09 AC 141 ms
76,676 KB
testcase_10 AC 112 ms
76,052 KB
testcase_11 AC 95 ms
75,160 KB
testcase_12 AC 104 ms
85,272 KB
testcase_13 AC 120 ms
97,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import groupby

ret = []

for _ in range(int(input())):
    input()
    cs = [c for c, _ in groupby(input())]
    ret.append('P' if cs.count('P') > cs.count('K') else 'K')

print('\n'.join(ret))
0