結果

問題 No.161 制限ジャンケン
ユーザー (ΦωΦ)(ΦωΦ)
提出日時 2015-04-13 15:53:58
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 321 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 6,492 KB
実行使用メモリ 6,368 KB
最終ジャッジ日時 2023-09-17 19:58:27
合計ジャッジ時間 1,528 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 13 ms
6,164 KB
testcase_02 AC 13 ms
6,160 KB
testcase_03 AC 14 ms
6,280 KB
testcase_04 WA -
testcase_05 AC 13 ms
6,316 KB
testcase_06 AC 13 ms
6,160 KB
testcase_07 AC 13 ms
6,196 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python
from collections import Counter

s = 'GCP'
arr = map(int, raw_input().split())
counter = Counter(raw_input())
res = 0
for k, v in counter.items():
    winpos = s.index(k) - 1
    tmp = min(v, arr[winpos])
    res += tmp * 3
    v -= tmp
    drawpos = s.index(k)
    res += min(v, arr[drawpos])
print res
0