結果
| 問題 |
No.197 手品
|
| コンテスト | |
| ユーザー |
kg_curry57
|
| 提出日時 | 2018-06-22 12:47:50 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 669 bytes |
| コンパイル時間 | 98 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-06-30 17:55:31 |
| 合計ジャッジ時間 | 2,732 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 24 WA * 19 |
ソースコード
def main():
b, n, a = input(), int(input()), input()
b_lst, a_lst = [], []
b_lst2, a_lst2 = [], []
for i in range(3):
if b[i] == "o":
b_lst.append(i)
else:
b_lst2.append(i)
if a[i] == "o":
a_lst.append(i)
else:
a_lst2.append(i)
if len(b_lst) != len(a_lst):
print("SUCCESS")
else:
if len(b_lst) == 1 and (b_lst[0]-a_lst[0]) % 2 != n % 2:
print("SUCCESS")
elif len(b_lst) == 2 and (b_lst2[0]-a_lst2[0]) % 2 != n % 2:
print("SUCCESS")
else:
print("FAILURE")
if __name__ == '__main__':
main()
kg_curry57