結果
| 問題 | No.197 手品 |
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2020-10-27 04:38:32 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 34 ms / 1,000 ms |
| コード長 | 493 bytes |
| 記録 | |
| コンパイル時間 | 124 ms |
| コンパイル使用メモリ | 85,232 KB |
| 実行使用メモリ | 54,072 KB |
| 最終ジャッジ日時 | 2026-04-03 06:09:01 |
| 合計ジャッジ時間 | 2,381 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge4_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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")
Kazun