結果
| 問題 |
No.428 小数から逃げる夢
|
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2018-03-16 21:53:15 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 94 ms / 1,000 ms |
| コード長 | 470 bytes |
| コンパイル時間 | 154 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-12-21 14:41:33 |
| 合計ジャッジ時間 | 11,921 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 100 |
コンパイルメッセージ
Syntax OK
ソースコード
d = "0.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991"
x=d.split(".")
n=gets.to_i
ans=(x[1].to_i*n).to_s
m=ans.size
if m<=191
if m==190
ans="0"+ans
end
ans.size.times{|i|
if i==1
print(".")
end
printf("%d",ans[i].to_i)
}
else
m.times{|i|
if i==2
print(".")
end
printf("%d",ans[i].to_i)
}
end
puts ""
horiesiniti