結果
| 問題 |
No.161 制限ジャンケン
|
| コンテスト | |
| ユーザー |
e-mon
|
| 提出日時 | 2015-03-05 23:49:50 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 392 bytes |
| コンパイル時間 | 229 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-06-24 09:37:45 |
| 合計ジャッジ時間 | 1,908 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 WA * 9 |
ソースコード
#!/usr/bin/env python
# -*- coding: utf-8 -*-
hand_num = list(map(int,input().split()))
hand = {'G':0,'C':1,'P':2}
S = input()
point = 0
for s in S:
if hand_num[(hand[s] + 2)%3] > 0:
hand_num[(hand[s] + 2)%3] -= 1
point += 3
elif hand_num[hand[s]] > 0:
hand_num[hand[s]] -= 1
point += 1
else:
hand_num[(hand[s] + 1)%3] -= 1
print(point)
e-mon