結果
| 問題 | No.797 Noelちゃんとピラミッド |
| コンテスト | |
| ユーザー |
urutom
|
| 提出日時 | 2019-04-04 01:19:59 |
| 言語 | Ruby (4.0.2) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 137 bytes |
| 記録 | |
| コンパイル時間 | 106 ms |
| コンパイル使用メモリ | 9,216 KB |
| 実行使用メモリ | 93,424 KB |
| 最終ジャッジ日時 | 2026-05-29 16:44:27 |
| 合計ジャッジ時間 | 72,810 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 37 TLE * 23 |
コンパイルメッセージ
Syntax OK
ソースコード
M=10**9+7
n=gets.to_i-1
a=gets.split.map(&:to_i)
ans=0
comb=1
a.each_with_index{|v,i|
ans+=comb*v
comb=comb*(n-i)/(i+1)
}
puts ans%M
urutom