結果

問題 No.161 制限ジャンケン
ユーザー rocoder
提出日時 2017-07-30 02:54:38
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 267 bytes
コンパイル時間 83 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-10-10 20:28:37
合計ジャッジ時間 1,348 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

G,C,P=(int(i) for i in input().split())
S=input()
#rint (G)
T=0
for i in range(len(S)):
#    print (i)
    if S[i]=="G" and G>0:
        T+=1
        G-=1
    if S[i]=="C" and C>0:
        T+=1
        C-=1
    if S[i]=="P" and P>0:
        T+=1
        P-=1
print(T)
0