結果
| 問題 |
No.25 有限小数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-02-02 09:39:11 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 264 bytes |
| コンパイル時間 | 106 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-09-21 20:00:19 |
| 合計ジャッジ時間 | 3,894 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 22 |
コンパイルメッセージ
Main.rb:21: warning: ambiguous first argument; put parentheses or a space even after `-' operator Syntax OK
ソースコード
n=gets.to_i
m=gets.to_i
s=1
t=1
100.times{|i|
a=(n*t).to_f
b=(m*s).to_f
f=a/b
r=(f).floor
if f-r.to_f==0
if r%10==0
s*=10
next
else
p r%10
exit
end
end
t*=10
}
p -1