結果
問題 |
No.161 制限ジャンケン
|
ユーザー |
![]() |
提出日時 | 2015-03-06 00:46:24 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 540 bytes |
コンパイル時間 | 167 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-24 09:50:47 |
合計ジャッジ時間 | 1,184 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 4 WA * 12 |
ソースコード
G,C,P = map(int,raw_input().split(' '))#GCP S = raw_input() win = 0 drow = 0 b = [False for i in range(len(S))] for s in range(len(S)): if S[s] == 'G' and P > 0: win += 1 P -=1 b[i] = True if S[s] == 'C' and G > 0: win += 1 G -=1 b[i] = True if S[s] == 'P' and C > 0: win += 1 C -= 1 b[i] = True for i in range(len(S)): if b[i]: continue if S[i] == 'G' and G > 0: drow += 1 G -= 1 if S[i] == 'C' and C > 0: drow += 1 C -= 1 if S[i] == 'P' and P > 0: drow += 1 P -=1 count = win * 3 + drow print count