結果

問題 No.1528 Not 1
ユーザー O2MTO2MT
提出日時 2021-06-04 21:38:00
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 454 bytes
コンパイル時間 227 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 86,144 KB
最終ジャッジ日時 2024-04-30 02:05:33
合計ジャッジ時間 3,060 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
52,224 KB
testcase_01 AC 82 ms
84,608 KB
testcase_02 AC 63 ms
71,040 KB
testcase_03 AC 67 ms
73,856 KB
testcase_04 AC 81 ms
84,736 KB
testcase_05 AC 60 ms
66,304 KB
testcase_06 AC 76 ms
81,024 KB
testcase_07 AC 82 ms
84,992 KB
testcase_08 AC 68 ms
74,752 KB
testcase_09 AC 61 ms
67,712 KB
testcase_10 AC 68 ms
75,648 KB
testcase_11 WA -
testcase_12 AC 41 ms
51,840 KB
testcase_13 AC 40 ms
52,352 KB
testcase_14 AC 41 ms
52,224 KB
testcase_15 AC 40 ms
52,096 KB
testcase_16 AC 39 ms
52,480 KB
testcase_17 AC 40 ms
52,096 KB
testcase_18 AC 86 ms
85,888 KB
testcase_19 AC 86 ms
86,144 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