結果
問題 |
No.197 手品
|
ユーザー |
|
提出日時 | 2024-10-28 09:19:30 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 684 bytes |
コンパイル時間 | 378 ms |
コンパイル使用メモリ | 82,248 KB |
実行使用メモリ | 54,332 KB |
最終ジャッジ日時 | 2024-10-28 09:19:34 |
合計ジャッジ時間 | 3,924 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 24 WA * 19 |
ソースコード
S0 = input() N = int(input()) S1 = input() C0 = {"o":0,"x":0} C0["o"] = S0.count("o") C0["x"] = S0.count("x") C1 = {"o":0,"x":0} C1["o"] = S1.count("o") C1["x"] = S1.count("x") if C0["o"]!=C1["o"]: print("SUCCESS") elif C0["o"]==3 or C0["x"]==3: print("FAILURE") elif S0==S1: if N%2==0: print("FAILURE") else: print("SUCCESS") else: ind = 0 for i in range(3): if S0[i]==S1[i]: ind = i break if ind==0 or ind==2: if N%2==1: print("FAILURE") else: print("SUCCESS") else: if N%2==0: print("FAILURE") else: print("SUCCESS")