結果
問題 | No.161 制限ジャンケン |
ユーザー |
![]() |
提出日時 | 2016-04-16 22:47:33 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 12 ms / 5,000 ms |
コード長 | 212 bytes |
コンパイル時間 | 48 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2024-11-30 04:52:25 |
合計ジャッジ時間 | 832 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 |
ソースコード
g,c,p=map(int,raw_input().split()) s=raw_input() G,C,P=[s.count(i)for i in"GCP"] a=0 t=min(g,C) a+=t*3 g-=t C-=t t=min(c,P) a+=t*3 c-=t P-=t t=min(p,G) a+=t*3 p-=t G-=t a+=min(g,G) a+=min(c,C) a+=min(p,P) print a