結果

問題 No.858 わり算
ユーザー 👑 horiesinitihoriesiniti
提出日時 2023-02-08 11:42:24
言語 Ruby
(3.3.0)
結果
AC  
実行時間 87 ms / 2,000 ms
コード長 166 bytes
コンパイル時間 447 ms
コンパイル使用メモリ 11,344 KB
実行使用メモリ 15,240 KB
最終ジャッジ日時 2023-09-20 04:28:25
合計ジャッジ時間 2,406 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
15,140 KB
testcase_01 AC 86 ms
15,072 KB
testcase_02 AC 86 ms
15,156 KB
testcase_03 AC 87 ms
15,076 KB
testcase_04 AC 87 ms
15,124 KB
testcase_05 AC 85 ms
15,240 KB
testcase_06 AC 86 ms
15,160 KB
testcase_07 AC 86 ms
15,112 KB
testcase_08 AC 84 ms
15,172 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a,b=gets.split(" ").map{|e| e.to_i}
c=(a/b).to_s
d=a%b*10
d2=d
e=""
while d<b && e.size<=50 do
	e+="0"
	d*=10
end
e=(e+(d2*10**100/b).to_s)[0,50]
puts [c,e].join(".")
0