結果

問題 No.197 手品
ユーザー あかりきあかりき
提出日時 2021-03-13 20:40:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 984 bytes
コンパイル時間 349 ms
コンパイル使用メモリ 86,680 KB
実行使用メモリ 71,520 KB
最終ジャッジ日時 2023-08-05 13:43:20
合計ジャッジ時間 6,149 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,400 KB
testcase_01 AC 75 ms
71,412 KB
testcase_02 AC 76 ms
71,108 KB
testcase_03 AC 75 ms
71,008 KB
testcase_04 AC 76 ms
71,384 KB
testcase_05 AC 76 ms
71,336 KB
testcase_06 AC 76 ms
71,400 KB
testcase_07 AC 75 ms
71,404 KB
testcase_08 AC 74 ms
71,340 KB
testcase_09 AC 77 ms
71,472 KB
testcase_10 AC 78 ms
71,132 KB
testcase_11 AC 79 ms
71,388 KB
testcase_12 AC 76 ms
71,324 KB
testcase_13 AC 74 ms
71,332 KB
testcase_14 AC 76 ms
71,452 KB
testcase_15 AC 76 ms
71,128 KB
testcase_16 AC 77 ms
71,212 KB
testcase_17 WA -
testcase_18 AC 77 ms
71,120 KB
testcase_19 AC 77 ms
71,256 KB
testcase_20 WA -
testcase_21 AC 78 ms
71,324 KB
testcase_22 WA -
testcase_23 AC 75 ms
71,212 KB
testcase_24 AC 77 ms
71,496 KB
testcase_25 AC 75 ms
71,332 KB
testcase_26 AC 75 ms
71,084 KB
testcase_27 AC 75 ms
71,400 KB
testcase_28 AC 75 ms
71,256 KB
testcase_29 AC 77 ms
71,380 KB
testcase_30 AC 78 ms
71,364 KB
testcase_31 AC 75 ms
71,520 KB
testcase_32 AC 76 ms
71,384 KB
testcase_33 AC 76 ms
71,224 KB
testcase_34 WA -
testcase_35 AC 74 ms
71,464 KB
testcase_36 AC 75 ms
71,384 KB
testcase_37 AC 76 ms
71,008 KB
testcase_38 AC 77 ms
71,128 KB
testcase_39 WA -
testcase_40 AC 77 ms
71,408 KB
testcase_41 WA -
testcase_42 AC 77 ms
71,388 KB
testcase_43 AC 76 ms
71,280 KB
testcase_44 AC 75 ms
71,128 KB
testcase_45 AC 78 ms
71,392 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 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')
0