結果
| 問題 | 
                            No.197 手品
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2015-07-03 23:35:35 | 
| 言語 | Python2  (2.7.18)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 649 bytes | 
| コンパイル時間 | 135 ms | 
| コンパイル使用メモリ | 7,072 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-06-27 09:56:51 | 
| 合計ジャッジ時間 | 1,765 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 WA * 1 | 
| other | AC * 38 WA * 5 | 
ソースコード
sb=raw_input()
n=int(raw_input())
sa=raw_input()
if n == 0 and sb.count("o") != sa.count("o"):
    print("SUCCESS")
elif n== 0 and sb.count("o") == sa.count("o"):
    print("FAILURE")
elif n == 1:
    if sb[1] in "o" and sa[1] in "o":
        print("FAILURE")
    elif sb.count("o") != sa.count("o"):
        print("SUCCESS")
    else:
        if sb.count("o") == sa.count("o") and sb == sa:
            print("FAILURE")
        elif sb.count("o") == sa.count("o") and sb != sa:
            print("FAILURE")
        else:
            print("SUCCESS")
elif n >= 2 and (sb.count("o") == sa.count("o")):
    print("FAILURE")
else:
    print("SUCCESS")