結果
| 問題 |
No.197 手品
|
| コンテスト | |
| ユーザー |
Konton7
|
| 提出日時 | 2019-05-22 23:02:03 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 522 bytes |
| コンパイル時間 | 74 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-09-17 09:40:00 |
| 合計ジャッジ時間 | 2,522 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 38 WA * 5 |
ソースコード
start = input()
n = int(input())
end = input()
ans = "SUCCESS"
move_list = [ ["012"], ["102","021"], ["120","201"], ["210"] ]
movable_list = []
if start.count("o") != end.count("o"):
print(ans)
else:
if start.count("o") in [3,0]:
print(ans)
else:
for i in range(4):
for j in move_list[i]:
if "".join([ start[int(j[k])] for k in range(3) ]) == end:
movable_list.append(i)
suc = 0
for i in movable_list:
if n >= i and (n-i) % 2 == 0:
suc = 1
if suc == 1:
ans = "FAILURE"
print(ans)
Konton7