結果
問題 |
No.135 とりあえず1次元の問題
|
ユーザー |
|
提出日時 | 2015-08-13 05:25:55 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 152 bytes |
コンパイル時間 | 319 ms |
コンパイル使用メモリ | 7,936 KB |
実行使用メモリ | 24,844 KB |
最終ジャッジ日時 | 2025-01-03 07:23:07 |
合計ジャッジ時間 | 4,965 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 22 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - num Syntax OK
ソースコード
num = gets.chomp.to_i arr = gets.chomp.split.map(&:to_i) ans = [] for i in 1...arr.length ans.push (arr[i] - arr[i-1]).abs end ans = ans.sort puts ans