結果
問題 |
No.161 制限ジャンケン
|
ユーザー |
|
提出日時 | 2024-10-08 09:22:26 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 33 ms / 5,000 ms |
コード長 | 287 bytes |
コンパイル時間 | 358 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-10-08 09:22:28 |
合計ジャッジ時間 | 1,570 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 |
ソースコード
G, C, P = map(int, input().split()) S = input() eg = S.count("G") ec = S.count("C") ep = S.count("P") x, y, z = min(G, ec), min(C, ep), min(P, eg) point = (x + y + z) * 3 G -= x ec -= x C -= y ep -= y P -= z eg -= z point += min(G, eg) + min(C, ec) + min(P, ep) print(point)