結果
| 問題 | No.40 多項式の割り算 |
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2018-03-31 17:09:16 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 112 ms / 5,000 ms |
| コード長 | 204 bytes |
| 記録 | |
| コンパイル時間 | 493 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,800 KB |
| 最終ジャッジ日時 | 2024-06-26 03:24:18 |
| 合計ジャッジ時間 | 5,259 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - d Syntax OK
ソースコード
d=gets.to_i
x=gets.split.map{|e| e.to_i}.reverse
while x.size>3
e=x.shift
x[1]+=e
end
while x.size>0 && x[0]==0
x.shift
end
if x.size==0
puts "0"
puts "0"
else
puts x.size-1
puts x.reverse*" "
end
horiesiniti