結果
| 問題 | No.2723 Fortune-telling by Flowers |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-11 17:22:33 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 398 ms / 2,000 ms |
| + 535µs | |
| コード長 | 239 bytes |
| 記録 | |
| コンパイル時間 | 93 ms |
| コンパイル使用メモリ | 64,480 KB |
| 実行使用メモリ | 81,756 KB |
| 最終ジャッジ日時 | 2026-10-22 12:10:12 |
| 合計ジャッジ時間 | 4,035 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 14 |
ソースコード
for _ in range(int(input())):
N = int(input())
S = input()
rle = ['-']
for c in S:
if rle[-1] != c:
rle.append(c)
if rle.count('K') >= rle.count('P'):
print('K')
else:
print('P')