結果
| 問題 | No.797 Noelちゃんとピラミッド |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-03-15 21:56:51 |
| 言語 | Ruby (4.0.2) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 267 bytes |
| 記録 | |
| コンパイル時間 | 378 ms |
| コンパイル使用メモリ | 8,832 KB |
| 実行使用メモリ | 1,314,724 KB |
| 最終ジャッジ日時 | 2026-03-22 23:15:10 |
| 合計ジャッジ時間 | 129,808 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 MLE * 2 |
| other | WA * 19 TLE * 13 MLE * 28 |
コンパイルメッセージ
Main.rb:9: warning: assigned but unused variable - a Syntax OK
ソースコード
def sum_each_to_other(list)
return list.first if list.count <= 1
sum_list=[]
for i in (0..list.count-2) do
sum_list.push list[i] + list[i+1]
end
sum_each_to_other(sum_list)
end
a = gets.to_i
puts sum_each_to_other(gets.split.map(&:to_i))