結果

問題 No.197 手品
ユーザー あかりきあかりき
提出日時 2021-03-13 20:39:10
言語 PyPy3
(7.3.13)
結果
WA  
実行時間 -
コード長 951 bytes
コンパイル時間 1,100 ms
コンパイル使用メモリ 87,160 KB
実行使用メモリ 71,520 KB
最終ジャッジ日時 2023-08-05 13:41:38
合計ジャッジ時間 6,727 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,320 KB
testcase_01 AC 71 ms
71,448 KB
testcase_02 AC 72 ms
71,020 KB
testcase_03 AC 71 ms
71,060 KB
testcase_04 AC 71 ms
71,492 KB
testcase_05 AC 70 ms
71,176 KB
testcase_06 AC 71 ms
71,096 KB
testcase_07 AC 72 ms
71,088 KB
testcase_08 AC 71 ms
71,080 KB
testcase_09 AC 71 ms
71,356 KB
testcase_10 AC 70 ms
71,276 KB
testcase_11 AC 71 ms
71,280 KB
testcase_12 AC 72 ms
71,212 KB
testcase_13 AC 72 ms
71,208 KB
testcase_14 AC 70 ms
71,252 KB
testcase_15 AC 72 ms
71,280 KB
testcase_16 AC 70 ms
71,016 KB
testcase_17 WA -
testcase_18 AC 71 ms
71,012 KB
testcase_19 AC 71 ms
71,512 KB
testcase_20 WA -
testcase_21 AC 72 ms
71,480 KB
testcase_22 WA -
testcase_23 AC 72 ms
71,076 KB
testcase_24 AC 72 ms
71,020 KB
testcase_25 AC 72 ms
71,264 KB
testcase_26 AC 71 ms
71,376 KB
testcase_27 AC 73 ms
71,152 KB
testcase_28 AC 73 ms
71,280 KB
testcase_29 AC 73 ms
71,220 KB
testcase_30 AC 73 ms
71,128 KB
testcase_31 AC 74 ms
71,432 KB
testcase_32 AC 73 ms
71,156 KB
testcase_33 AC 72 ms
71,272 KB
testcase_34 WA -
testcase_35 AC 72 ms
71,256 KB
testcase_36 AC 73 ms
71,220 KB
testcase_37 AC 72 ms
71,240 KB
testcase_38 AC 72 ms
71,212 KB
testcase_39 WA -
testcase_40 AC 71 ms
71,452 KB
testcase_41 WA -
testcase_42 AC 72 ms
71,092 KB
testcase_43 AC 72 ms
71,364 KB
testcase_44 AC 71 ms
71,444 KB
testcase_45 AC 71 ms
71,004 KB
testcase_46 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

sb=list(input())
n=int(input())
sa=list(input())

if n==0 and sb!=sa:
  print('SUCCESS')
  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