結果
| 問題 | 
                            No.197 手品
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2016-04-11 11:17:39 | 
| 言語 | Python2  (2.7.18)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 12 ms / 1,000 ms | 
| コード長 | 535 bytes | 
| コンパイル時間 | 283 ms | 
| コンパイル使用メモリ | 6,912 KB | 
| 実行使用メモリ | 6,272 KB | 
| 最終ジャッジ日時 | 2024-07-20 03:47:39 | 
| 合計ジャッジ時間 | 1,965 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 43 | 
ソースコード
#coding: utf-8
##yuki_197
sb=raw_input()
n=int(raw_input())
sa=raw_input()
if sb.count('o')!=sa.count('o'):
 res=False
elif n>=2:
 res=True
elif n==0:
 if sb==sa:
  res=True
 else:
  res=False
elif n==1:
 if sb=="oxx" and sa=="xxo":
  res=False
 elif sb=="xxo" and sa=="oxx":
  res=False
 elif sb=="oox" and sa=="xoo":
  res=False
 elif sb=="xoo" and sa=="oox":
  res=False
 elif sb=="oxo" and sa=="oxo":
  res=False
 elif sb=="xox" and sa=="xox":
  res=False
 else:
  res=True
if res==True:
 print "FAILURE"
else:
 print "SUCCESS"