結果
問題 | No.2723 Fortune-telling by Flowers |
ユーザー |
👑 |
提出日時 | 2024-04-12 22:48:04 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 396 ms / 2,000 ms |
コード長 | 371 bytes |
コンパイル時間 | 191 ms |
コンパイル使用メモリ | 82,368 KB |
実行使用メモリ | 86,652 KB |
最終ジャッジ日時 | 2024-10-02 23:37:38 |
合計ジャッジ時間 | 2,870 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 13 |
ソースコード
def solve():n = int(input())S = input()T = S.split("-")c = 0for t in T:if t == "":continueelif t[0] == t[-1]:if t[0] == "P":c += 1else:c -= 1return c > 0for _ in range(int(input())):if solve():print("P")else:print("K")