結果

問題 No.428 小数から逃げる夢
コンテスト
ユーザー te-sh
提出日時 2017-10-27 16:54:31
言語 D
(dmd 2.112.0)
コンパイル:
dmd -fPIE -m64 -w -wi -O -release -inline -I/opt/dmd/src/druntime/import/ -I/opt/dmd/src/phobos -L-L/opt/dmd/linux/lib64/ -fPIC _filename_
実行:
./Main
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 501 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,166 ms
コンパイル使用メモリ 124,932 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2026-03-05 17:09:22
合計ジャッジ時間 3,930 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 100
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import std.algorithm, std.conv, std.range, std.stdio, std.string;
import std.bigint;    // BigInt

void main()
{
  auto d = BigInt("1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991");
  auto n = readln.chomp.to!int;
  d *= n;
  auto s = d.to!string, ns = s.length;
  if (ns == 190)
    writeln("0.", s);
  else
    writeln(s[0..ns-190], ".", s[ns-190..$]);
}
0