結果

問題 No.197 手品
ユーザー あかりきあかりき
提出日時 2021-03-13 20:53:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 43 ms / 1,000 ms
コード長 1,219 bytes
コンパイル時間 300 ms
コンパイル使用メモリ 82,104 KB
実行使用メモリ 54,108 KB
最終ジャッジ日時 2024-04-23 11:04:17
合計ジャッジ時間 3,440 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,964 KB
testcase_01 AC 38 ms
52,704 KB
testcase_02 AC 38 ms
52,952 KB
testcase_03 AC 37 ms
52,688 KB
testcase_04 AC 38 ms
52,560 KB
testcase_05 AC 37 ms
53,264 KB
testcase_06 AC 38 ms
52,960 KB
testcase_07 AC 38 ms
54,040 KB
testcase_08 AC 43 ms
53,144 KB
testcase_09 AC 39 ms
53,268 KB
testcase_10 AC 39 ms
53,200 KB
testcase_11 AC 39 ms
53,232 KB
testcase_12 AC 39 ms
52,492 KB
testcase_13 AC 40 ms
52,340 KB
testcase_14 AC 38 ms
52,280 KB
testcase_15 AC 38 ms
52,332 KB
testcase_16 AC 39 ms
52,632 KB
testcase_17 AC 39 ms
54,104 KB
testcase_18 AC 40 ms
52,068 KB
testcase_19 AC 39 ms
53,508 KB
testcase_20 AC 39 ms
53,072 KB
testcase_21 AC 39 ms
53,020 KB
testcase_22 AC 38 ms
53,340 KB
testcase_23 AC 40 ms
52,672 KB
testcase_24 AC 39 ms
52,392 KB
testcase_25 AC 40 ms
52,428 KB
testcase_26 AC 38 ms
52,616 KB
testcase_27 AC 39 ms
52,408 KB
testcase_28 AC 39 ms
54,108 KB
testcase_29 AC 38 ms
52,756 KB
testcase_30 AC 40 ms
53,984 KB
testcase_31 AC 40 ms
53,004 KB
testcase_32 AC 40 ms
53,672 KB
testcase_33 AC 38 ms
53,108 KB
testcase_34 AC 38 ms
52,620 KB
testcase_35 AC 39 ms
53,428 KB
testcase_36 AC 39 ms
52,768 KB
testcase_37 AC 38 ms
53,052 KB
testcase_38 AC 39 ms
52,936 KB
testcase_39 AC 39 ms
52,936 KB
testcase_40 AC 39 ms
52,708 KB
testcase_41 AC 39 ms
53,616 KB
testcase_42 AC 38 ms
53,420 KB
testcase_43 AC 41 ms
52,528 KB
testcase_44 AC 39 ms
53,568 KB
testcase_45 AC 39 ms
53,120 KB
testcase_46 AC 39 ms
53,424 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