結果
| 問題 | 
                            No.197 手品
                             | 
                    
| コンテスト | |
| ユーザー | 
                             あかりき
                         | 
                    
| 提出日時 | 2021-03-13 20:40:21 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 984 bytes | 
| コンパイル時間 | 229 ms | 
| コンパイル使用メモリ | 81,912 KB | 
| 実行使用メモリ | 54,168 KB | 
| 最終ジャッジ日時 | 2024-10-15 10:49:34 | 
| 合計ジャッジ時間 | 3,393 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 36 WA * 7 | 
ソースコード
sb=list(input())
n=int(input())
sa=list(input())
if n==0:
  if sb!=sa:
    print('SUCCESS')
  else:
    print('FAILURE')
  exit()
if sb.count('o')!=sa.count('o'):
  print('SUCCESS')
  exit()
if sb.count('o')==0 or sb.count('o')==3:
  print('FAILURE')
  exit()
if sb.count('o')==1:
  if n>=2:
    print('FAILURE')
  else:
    if (sb==['o','x','x'] and sa==['x','x','o']) or (sa==['o','x','x'] and sb==['x','x','o']):
      print('SUCCESS')
    else:
      print('FAILURE')
  exit()
if sb.count('o')==2:
  if sb==['o','o','x']:
    if (n%2==1 and sa==['o','x','o']) or (n%2==0 and sa==['x','o','o']):
      print('FAILURE')
    else:
      print('SUCCESS')
  elif sb==['o','x','o']:
    if (n%2==1 and sa==['x','o','o']) or (n%2==1 and sa==['o','o','x']) or(n%2==0 and sa==['o','x','o']):
      print('FAILURE')
    else:
      print('SUCCESS')
  else:
    if (n%2==1 and sa==['o','x','o']) or (n%2==0 and sa==['o','o','x']):
      print('FAILURE')
    else:
      print('SUCCESS')
            
            
            
        
            
あかりき