結果

問題 No.1528 Not 1
ユーザー yuruhiyayuruhiya
提出日時 2021-06-05 20:21:53
言語 Crystal
(1.11.2)
結果
WA  
実行時間 -
コード長 189 bytes
コンパイル時間 23,805 ms
コンパイル使用メモリ 252,652 KB
実行使用メモリ 6,568 KB
最終ジャッジ日時 2023-08-14 01:17:27
合計ジャッジ時間 24,873 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 8 ms
6,524 KB
testcase_02 AC 4 ms
4,972 KB
testcase_03 AC 5 ms
4,900 KB
testcase_04 AC 7 ms
6,480 KB
testcase_05 WA -
testcase_06 AC 6 ms
5,380 KB
testcase_07 AC 7 ms
6,568 KB
testcase_08 WA -
testcase_09 AC 4 ms
4,832 KB
testcase_10 AC 4 ms
4,848 KB
testcase_11 AC 2 ms
4,416 KB
testcase_12 AC 2 ms
4,476 KB
testcase_13 AC 2 ms
4,356 KB
testcase_14 WA -
testcase_15 AC 2 ms
4,516 KB
testcase_16 AC 2 ms
4,384 KB
testcase_17 AC 2 ms
4,420 KB
testcase_18 AC 8 ms
6,480 KB
testcase_19 AC 9 ms
6,524 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = read_line.to_i
if n.even?
  puts 2.step(to: n, by: 2).join(' ')
elsif n >= 6
  puts 2.step(to: n, by: 2).reject(6).chain([3, 6].each).join(' ')
elsif n == 1
  puts 1
else
  puts -1
end
0