結果

問題 No.40 多項式の割り算
ユーザー 👑 horiesinitihoriesiniti
提出日時 2018-03-31 17:09:16
言語 Ruby
(3.3.0)
結果
AC  
実行時間 101 ms / 5,000 ms
コード長 204 bytes
コンパイル時間 196 ms
コンパイル使用メモリ 11,284 KB
実行使用メモリ 15,992 KB
最終ジャッジ日時 2023-09-08 10:04:44
合計ジャッジ時間 5,143 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
15,164 KB
testcase_01 AC 81 ms
15,208 KB
testcase_02 AC 81 ms
15,068 KB
testcase_03 AC 82 ms
15,116 KB
testcase_04 AC 91 ms
15,432 KB
testcase_05 AC 94 ms
15,360 KB
testcase_06 AC 100 ms
15,604 KB
testcase_07 AC 101 ms
15,992 KB
testcase_08 AC 84 ms
15,176 KB
testcase_09 AC 92 ms
15,456 KB
testcase_10 AC 98 ms
15,584 KB
testcase_11 AC 89 ms
15,560 KB
testcase_12 AC 86 ms
15,144 KB
testcase_13 AC 97 ms
15,812 KB
testcase_14 AC 89 ms
15,464 KB
testcase_15 AC 89 ms
15,468 KB
testcase_16 AC 97 ms
15,588 KB
testcase_17 AC 84 ms
15,252 KB
testcase_18 AC 95 ms
15,544 KB
testcase_19 AC 100 ms
15,844 KB
testcase_20 AC 87 ms
15,336 KB
testcase_21 AC 86 ms
15,104 KB
testcase_22 AC 85 ms
15,144 KB
testcase_23 AC 86 ms
15,380 KB
testcase_24 AC 91 ms
15,392 KB
testcase_25 AC 82 ms
15,316 KB
testcase_26 AC 81 ms
15,044 KB
testcase_27 AC 81 ms
15,108 KB
testcase_28 AC 83 ms
15,316 KB
testcase_29 AC 82 ms
15,316 KB
testcase_30 AC 83 ms
15,312 KB
testcase_31 AC 82 ms
15,176 KB
testcase_32 AC 83 ms
15,068 KB
testcase_33 AC 83 ms
15,040 KB
testcase_34 AC 82 ms
15,128 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - d
Syntax OK

ソースコード

diff #

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
0