結果
| 問題 | No.161 制限ジャンケン |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-09-03 14:37:39 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 582 bytes |
| 記録 | |
| コンパイル時間 | 134 ms |
| コンパイル使用メモリ | 76,916 KB |
| 最終ジャッジ日時 | 2025-12-03 21:23:01 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 16 |
ソースコード
a = dict((x, y) for x, y in zip('GCP', map(int, raw_input().split())))
s = raw_input()
b = dict((c, s.count(c)) for c in 'GCP')
ans = 0
print a
print b
print
for s, t in zip('GCP', 'CPG'):
if a[s] <= b[t]:
ans += a[s]*3
b[t] -= a[s]
a[s] = 0
else:
ans += b[t]*3
a[s] -= b[t]
b[t] = 0
print a
print b
print ans
print
for s in 'GCP':
if a[s] <= b[s]:
ans += a[s]
b[s] -= a[s]
a[s] = 0
else:
ans += b[s]
a[s] -= b[s]
b[s] = 0
print a
print b
print ans