結果
問題 | No.197 手品 |
ユーザー |
👑 |
提出日時 | 2022-01-20 08:31:33 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 552 bytes |
コンパイル時間 | 197 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 52,480 KB |
最終ジャッジ日時 | 2024-11-23 14:21:57 |
合計ジャッジ時間 | 3,646 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 WA * 23 |
ソースコード
bef = input() n = int(input()) aft = input() def suc(): print("SUCCESS") def fai(): print("FAILURE") if bef.count("o") != aft.count("o"): suc() elif len(bef) == 1: fai() elif n == 0: if bef != aft: suc() else: fai() else: if bef.count("o") == 1: x = (bef[1] == "o") ^ (aft[1] == "o") if x ^ (n % 2 == 0): fai() else: suc() else: x = (bef[1] == "x") ^ (aft[1] == "x") if x ^ (n % 2 == 0): fai() else: suc()