結果

問題 No.197 手品
ユーザー あかりきあかりき
提出日時 2021-03-13 20:53:12
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 76 ms / 1,000 ms
コード長 1,219 bytes
コンパイル時間 278 ms
コンパイル使用メモリ 87,200 KB
実行使用メモリ 71,496 KB
最終ジャッジ日時 2023-08-05 13:53:06
合計ジャッジ時間 5,823 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,244 KB
testcase_01 AC 68 ms
71,380 KB
testcase_02 AC 68 ms
71,244 KB
testcase_03 AC 69 ms
71,424 KB
testcase_04 AC 76 ms
71,376 KB
testcase_05 AC 70 ms
71,212 KB
testcase_06 AC 70 ms
71,116 KB
testcase_07 AC 71 ms
71,228 KB
testcase_08 AC 70 ms
71,324 KB
testcase_09 AC 70 ms
71,220 KB
testcase_10 AC 68 ms
71,380 KB
testcase_11 AC 69 ms
71,100 KB
testcase_12 AC 68 ms
71,208 KB
testcase_13 AC 69 ms
71,496 KB
testcase_14 AC 69 ms
71,208 KB
testcase_15 AC 69 ms
71,380 KB
testcase_16 AC 72 ms
71,388 KB
testcase_17 AC 69 ms
71,104 KB
testcase_18 AC 70 ms
71,144 KB
testcase_19 AC 69 ms
71,236 KB
testcase_20 AC 70 ms
71,384 KB
testcase_21 AC 71 ms
71,220 KB
testcase_22 AC 71 ms
71,064 KB
testcase_23 AC 70 ms
71,192 KB
testcase_24 AC 71 ms
71,320 KB
testcase_25 AC 70 ms
71,208 KB
testcase_26 AC 69 ms
71,224 KB
testcase_27 AC 73 ms
71,328 KB
testcase_28 AC 70 ms
71,384 KB
testcase_29 AC 70 ms
71,444 KB
testcase_30 AC 72 ms
71,220 KB
testcase_31 AC 71 ms
71,204 KB
testcase_32 AC 71 ms
71,060 KB
testcase_33 AC 71 ms
71,076 KB
testcase_34 AC 71 ms
71,376 KB
testcase_35 AC 72 ms
71,196 KB
testcase_36 AC 71 ms
71,284 KB
testcase_37 AC 74 ms
71,064 KB
testcase_38 AC 72 ms
71,204 KB
testcase_39 AC 71 ms
71,148 KB
testcase_40 AC 73 ms
71,100 KB
testcase_41 AC 70 ms
71,444 KB
testcase_42 AC 76 ms
71,208 KB
testcase_43 AC 71 ms
71,196 KB
testcase_44 AC 71 ms
71,196 KB
testcase_45 AC 71 ms
71,440 KB
testcase_46 AC 72 ms
71,248 KB
権限があれば一括ダウンロードができます

ソースコード

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 n>=2:
  print('FAILURE')
  exit()

if sb.count('o')==1:
  if sb==['o','x','x']:
    if (n==1 and sa==['o','x','x']) or (n==1 and sa==['x','o','x']):
      print('FAILURE')
    else:
      print('SUCCESS')
  elif sb==['x','o','x']:
    if (n==1 and sa==['o','x','x']) or (n==1 and sa==['x','x','o']):
      print('FAILURE')
    else:
      print('SUCCESS')
  else:
    if (n==1 and sa==['x','x','o']) or (n==1 and sa==['x','o','x']):
      print('FAILURE')
    else:
      print('SUCCESS')
  exit()

if sb.count('o')==2:
  if sb==['o','o','x']:
    if (n==1 and sa==['o','x','o']) or (n==1 and sa==['o','o','x']):
      print('FAILURE')
    else:
      print('SUCCESS')
  elif sb==['o','x','o']:
    if (n==1 and sa==['o','o','x']) or (n==1 and sa==['x','o','o']):
      print('FAILURE')
    else:
      print('SUCCESS')
  else:
    if (n==1 and sa==['o','x','o']) or (n==1 and sa==['x','o','o']):
      print('FAILURE')
    else:
      print('SUCCESS')
0