結果
問題 |
No.161 制限ジャンケン
|
ユーザー |
|
提出日時 | 2024-10-08 09:05:32 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 577 bytes |
コンパイル時間 | 229 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-10-08 09:05:34 |
合計ジャッジ時間 | 1,719 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 WA * 9 |
ソースコード
G, C, P = map(int, input().split()) S = input() point = 0 for s in S: if s == "G": if P > 0: point += 3 P -= 1 else: if G > 0: point += 1 G -= 1 elif s == "C": if G > 0: point += 3 G -= 1 else: if C > 0: point += 1 C -= 1 elif s == "P": if C > 0: point += 3 C -= 1 else: if P > 0: point += 1 P -= 1 print(point)