結果
問題 | No.197 手品 |
ユーザー |
👑 ![]() |
提出日時 | 2020-10-27 04:38:32 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 43 ms / 1,000 ms |
コード長 | 493 bytes |
コンパイル時間 | 171 ms |
コンパイル使用メモリ | 82,380 KB |
実行使用メモリ | 52,224 KB |
最終ジャッジ日時 | 2024-07-21 21:50:11 |
合計ジャッジ時間 | 3,220 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 43 |
ソースコード
S=input() N=int(input()) T=input() o,x="o","x" if S.count(o)!=T.count(o): print("SUCCESS") exit() elif S.count(o)==0 or S.count(o)==3: print("FAILURE") exit() if S.count(o)==1: p=S.index(o) q=T.index(o) else: p=S.index(x) q=T.index(x) if N==0: F=(p==q) elif N==1: if p==0: F=(q==0) or (q==1) elif p==1: F=(q==0) or (q==2) else: F=(q==1) or (q==2) else: F=True if F: print("FAILURE") else: print("SUCCESS")