結果
| 問題 | No.161 制限ジャンケン |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-08 09:05:32 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 577 bytes |
| 記録 | |
| コンパイル時間 | 59 ms |
| コンパイル使用メモリ | 14,848 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2026-09-11 23:02:44 |
| 合計ジャッジ時間 | 2,144 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)