結果
問題 |
No.197 手品
|
ユーザー |
![]() |
提出日時 | 2024-01-01 16:55:29 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 628 bytes |
コンパイル時間 | 407 ms |
コンパイル使用メモリ | 82,984 KB |
実行使用メモリ | 54,156 KB |
最終ジャッジ日時 | 2024-09-27 17:25:06 |
合計ジャッジ時間 | 3,466 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 39 WA * 4 |
ソースコード
S1 = input() N = int(input()) S2 = input() def prt(x): if x == 0: print("FAILURE") else: print("SUCCESS") exit() if S1.count("o") != S2.count("o"): prt(1) if S1.count("o") == 0 and S2.count("o") == 0: prt(0) if S1.count("x") == 0 and S2.count("x") == 0: prt(0) if N == 0: if S1 == S2: prt(0) else: prt(1) X1 = int(S1.replace("x","0").replace("o","1"),2) X2 = int(S2.replace("x","0").replace("o","1"),2) if X1 in [3,5,6]: X1 = 7 - X1 X2 = 7 - X2 if N > 1: prt(0) if X1 == 4: X1 = 1 if X2 == 4: X2 = 1 if X1 == X2: prt(1) else: prt(0)