結果
問題 |
No.219 巨大数の概算
|
ユーザー |
|
提出日時 | 2017-05-17 16:22:28 |
言語 | D (dmd 2.109.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 434 bytes |
コンパイル時間 | 2,140 ms |
コンパイル使用メモリ | 149,648 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-12 19:19:17 |
合計ジャッジ時間 | 10,910 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | RE * 51 |
ソースコード
import std.algorithm, std.conv, std.range, std.stdio, std.string; import std.math; // math functions void main() { auto n = readln.chomp.to!size_t; foreach (_; 0..n) { auto rd = readln.split.to!(real[]), a = rd[0], b = rd[1]; auto c = b * log10(a); auto z = c.floor, w = c - z; auto d = 10 ^^ w; auto x = d.floor, y = ((d - x) * 10).floor; writefln("%d %d %d", x.to!int, y.to!int, z.to!int); } }