結果
| 問題 | No.797 Noelちゃんとピラミッド |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-03-15 21:56:51 |
| 言語 | Ruby (3.4.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 267 bytes |
| 記録 | |
| コンパイル時間 | 333 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 374,028 KB |
| 最終ジャッジ日時 | 2024-07-01 20:54:28 |
| 合計ジャッジ時間 | 4,448 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | TLE * 1 -- * 59 |
コンパイルメッセージ
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))