結果

問題 No.197 手品
ユーザー あかりきあかりき
提出日時 2021-03-13 20:46:24
言語 PyPy3
(7.3.13)
結果
WA  
実行時間 -
コード長 1,409 bytes
コンパイル時間 866 ms
コンパイル使用メモリ 86,708 KB
実行使用メモリ 71,588 KB
最終ジャッジ日時 2023-08-05 13:49:08
合計ジャッジ時間 5,986 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
71,332 KB
testcase_01 AC 65 ms
71,272 KB
testcase_02 AC 62 ms
71,328 KB
testcase_03 AC 61 ms
71,052 KB
testcase_04 AC 61 ms
71,052 KB
testcase_05 AC 60 ms
71,256 KB
testcase_06 AC 60 ms
71,440 KB
testcase_07 AC 61 ms
71,224 KB
testcase_08 AC 59 ms
71,204 KB
testcase_09 AC 63 ms
71,324 KB
testcase_10 AC 59 ms
71,324 KB
testcase_11 AC 59 ms
71,228 KB
testcase_12 WA -
testcase_13 AC 61 ms
71,052 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 59 ms
71,536 KB
testcase_24 AC 58 ms
71,140 KB
testcase_25 AC 58 ms
71,104 KB
testcase_26 AC 59 ms
71,288 KB
testcase_27 WA -
testcase_28 AC 57 ms
71,104 KB
testcase_29 WA -
testcase_30 AC 58 ms
71,340 KB
testcase_31 AC 59 ms
71,540 KB
testcase_32 AC 60 ms
71,160 KB
testcase_33 WA -
testcase_34 AC 59 ms
71,216 KB
testcase_35 AC 57 ms
71,340 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 59 ms
71,100 KB
testcase_39 WA -
testcase_40 AC 59 ms
71,120 KB
testcase_41 WA -
testcase_42 AC 57 ms
71,168 KB
testcase_43 AC 57 ms
71,288 KB
testcase_44 WA -
testcase_45 AC 59 ms
71,204 KB
testcase_46 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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 sb==['o','x','x']:
    if (n%2==1 and sa==['x','o','x']) or (n%2==0 and sa==['x','x','o']) or (n%2==0 and sa==['o','x','x']):
      print('FAILURE')
    else:
      print('SUCCESS')
  elif sb==['x','o','x']:
    if (n%2==1 and sa==['o','x','x']) or (n%2==1 and sa==['x','x','o']) or (n%2==0 and sa==['x','o','x']):
      print('FAILURE')
    else:
      print('SUCCESS')
  else:
    if (n%2==1 and sa==['x','o','x']) or (n%2==0 and sa==['x','x','o']) or (n%2==0 and sa==['o','x','x']):
      print('FAILURE')
    else:
      print('SUCCESS')
  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']) or (n%2==0 and sa==['o','o','x']):
      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']) or (n%2==0 and sa==['x','o','o']):
      print('FAILURE')
    else:
      print('SUCCESS')
0