結果

問題 No.1528 Not 1
ユーザー O2MTO2MT
提出日時 2021-06-04 21:38:00
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 454 bytes
コンパイル時間 1,762 ms
コンパイル使用メモリ 86,620 KB
実行使用メモリ 86,856 KB
最終ジャッジ日時 2023-08-12 12:09:47
合計ジャッジ時間 4,839 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
71,144 KB
testcase_01 AC 100 ms
85,492 KB
testcase_02 AC 72 ms
78,140 KB
testcase_03 AC 75 ms
79,044 KB
testcase_04 AC 85 ms
85,116 KB
testcase_05 AC 70 ms
76,520 KB
testcase_06 AC 80 ms
81,940 KB
testcase_07 AC 87 ms
85,900 KB
testcase_08 AC 77 ms
79,424 KB
testcase_09 AC 78 ms
77,344 KB
testcase_10 AC 83 ms
79,620 KB
testcase_11 WA -
testcase_12 AC 60 ms
71,368 KB
testcase_13 AC 58 ms
70,856 KB
testcase_14 AC 61 ms
71,116 KB
testcase_15 AC 59 ms
71,320 KB
testcase_16 AC 58 ms
70,908 KB
testcase_17 AC 65 ms
71,256 KB
testcase_18 AC 87 ms
86,840 KB
testcase_19 AC 93 ms
86,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from  math import ceil
N = int(input())
M = ceil(N/2)
evenList = []
num = -1
flg = True
for i in range(2,N+1,2):
  if i%3 == 0:
    if flg:
      num = i
      flg = False
  else:
    evenList.append(i)
ansList = evenList
la = len(ansList)
if num != -1:
  ansList.append(num)
  la += 1
  for i in range(3,N+1,3):
    if la == M:
      break
    if i == num:
      continue
    la += 1
    ansList.append(i)
if la == M:
  print(*ansList)
else:
  print(-1)
0