結果
問題 | No.161 制限ジャンケン |
ユーザー | kurenaif |
提出日時 | 2016-02-23 21:43:31 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 497 bytes |
コンパイル時間 | 149 ms |
コンパイル使用メモリ | 10,780 KB |
実行使用メモリ | 7,948 KB |
最終ジャッジ日時 | 2023-08-20 04:46:04 |
合計ジャッジ時間 | 1,312 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | AC | 16 ms
7,896 KB |
testcase_03 | WA | - |
testcase_04 | AC | 15 ms
7,888 KB |
testcase_05 | WA | - |
testcase_06 | AC | 16 ms
7,776 KB |
testcase_07 | WA | - |
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 | - |
コンパイルメッセージ
Main.py:14: SyntaxWarning: "is" with a literal. Did you mean "=="? if c is 'G': Main.py:16: SyntaxWarning: "is" with a literal. Did you mean "=="? elif c is 'C': Main.py:18: SyntaxWarning: "is" with a literal. Did you mean "=="? elif c is 'P':
ソースコード
yuki = [0]*3 S = input() S = S.split() yuki[0] = int(S[0]) yuki[1] = int(S[1]) yuki[2] = int(S[2]) S = list(input()) aite = [0]*3 for c in S: if c is 'G': aite[0]+=1 elif c is 'C': aite[1]+=1 elif c is 'P': aite[2]+=1 point = 0 a = min(aite[0], yuki[2]) aite[0]-=a yuki[2]-=a point+=(3*a) a = min(aite[1], yuki[0]) aite[1]-=a yuki[0]-=a point+=(3*a) a = min(aite[2], yuki[1]) aite[2]-=a yuki[1]-=a point+=(3*a) for i in range(3): a = min(aite[i], yuki[i]) point+=a print(point)