結果

問題 No.796 well known
ユーザー maimai
提出日時 2019-03-15 21:27:06
言語 Ruby
(3.3.0)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 188 bytes
コンパイル時間 58 ms
コンパイル使用メモリ 11,524 KB
実行使用メモリ 16,272 KB
最終ジャッジ日時 2023-09-14 12:54:18
合計ジャッジ時間 3,033 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,240 KB
testcase_01 AC 78 ms
15,092 KB
testcase_02 AC 81 ms
15,296 KB
testcase_03 AC 80 ms
15,212 KB
testcase_04 AC 109 ms
15,756 KB
testcase_05 AC 111 ms
16,040 KB
testcase_06 AC 118 ms
16,272 KB
testcase_07 AC 89 ms
15,364 KB
testcase_08 AC 111 ms
15,828 KB
testcase_09 AC 101 ms
15,876 KB
testcase_10 AC 119 ms
16,108 KB
testcase_11 AC 87 ms
15,400 KB
testcase_12 AC 97 ms
15,616 KB
testcase_13 AC 109 ms
15,760 KB
testcase_14 AC 94 ms
15,412 KB
testcase_15 AC 99 ms
15,720 KB
testcase_16 AC 117 ms
16,024 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def ascan; gets.split.map(&:to_i); end

n = gets.to_i
1.upto(99) do |i|
  sum = 3 + i + (n-2) 
  if sum % 3 == 1
    printf "3 #{i} "
    print [1]*(n-2)*" "
    puts
    exit 0
  end
end
0