結果
| 問題 |
No.161 制限ジャンケン
|
| コンテスト | |
| ユーザー |
lllllll88938494
|
| 提出日時 | 2022-06-02 11:49:25 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 319 bytes |
| コンパイル時間 | 166 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 52,224 KB |
| 最終ジャッジ日時 | 2024-09-21 01:56:09 |
| 合計ジャッジ時間 | 1,643 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 3 WA * 13 |
ソースコード
g,c,p=map(int,input().split())
s=input()
dic={'G': p ,'C':g ,'P':c}
f=[1]*len(s)
cnt=0
for i in range(len(s)):
if dic[s[i]] > 0:
dic[s[i]] -= 1
cnt+=3
f[i] = 1
for i in range(len(s)):
if dic[s[i]] > 0 and f[i] > 0:
dic[s[i]] -= 1
cnt+=1
print(cnt)
lllllll88938494