結果
問題 | 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 = 0for s in S:if s == "G":if P > 0:point += 3P -= 1else:if G > 0:point += 1G -= 1elif s == "C":if G > 0:point += 3G -= 1else:if C > 0:point += 1C -= 1elif s == "P":if C > 0:point += 3C -= 1else:if P > 0:point += 1P -= 1print(point)