結果

問題 No.219 巨大数の概算
ユーザー NabetaniNabetani
提出日時 2015-10-25 00:01:38
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 314 bytes
コンパイル時間 69 ms
コンパイル使用メモリ 11,564 KB
実行使用メモリ 15,892 KB
最終ジャッジ日時 2023-10-11 09:15:40
合計ジャッジ時間 10,606 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 143 ms
15,844 KB
testcase_01 AC 136 ms
15,476 KB
testcase_02 AC 133 ms
15,840 KB
testcase_03 AC 134 ms
15,600 KB
testcase_04 WA -
testcase_05 AC 78 ms
15,560 KB
testcase_06 WA -
testcase_07 AC 78 ms
15,272 KB
testcase_08 WA -
testcase_09 AC 79 ms
15,584 KB
testcase_10 AC 136 ms
15,388 KB
testcase_11 AC 137 ms
15,692 KB
testcase_12 AC 132 ms
15,484 KB
testcase_13 AC 135 ms
15,616 KB
testcase_14 AC 134 ms
15,592 KB
testcase_15 AC 135 ms
15,488 KB
testcase_16 AC 135 ms
15,356 KB
testcase_17 AC 136 ms
15,788 KB
testcase_18 AC 136 ms
15,784 KB
testcase_19 AC 135 ms
15,772 KB
testcase_20 AC 134 ms
15,556 KB
testcase_21 AC 134 ms
15,556 KB
testcase_22 AC 136 ms
15,476 KB
testcase_23 AC 134 ms
15,516 KB
testcase_24 AC 136 ms
15,756 KB
testcase_25 AC 135 ms
15,892 KB
testcase_26 AC 132 ms
15,856 KB
testcase_27 AC 135 ms
15,468 KB
testcase_28 AC 137 ms
15,528 KB
testcase_29 AC 138 ms
15,812 KB
testcase_30 AC 133 ms
15,784 KB
testcase_31 AC 133 ms
15,692 KB
testcase_32 AC 135 ms
15,800 KB
testcase_33 AC 134 ms
15,644 KB
testcase_34 AC 132 ms
15,604 KB
testcase_35 AC 131 ms
15,784 KB
testcase_36 AC 132 ms
15,572 KB
testcase_37 AC 136 ms
15,556 KB
testcase_38 AC 131 ms
15,616 KB
testcase_39 AC 139 ms
15,556 KB
testcase_40 AC 134 ms
15,556 KB
testcase_41 AC 139 ms
15,472 KB
testcase_42 AC 136 ms
15,784 KB
testcase_43 AC 134 ms
15,816 KB
testcase_44 AC 131 ms
15,520 KB
testcase_45 AC 134 ms
15,660 KB
testcase_46 AC 126 ms
15,780 KB
testcase_47 AC 130 ms
15,692 KB
testcase_48 AC 129 ms
15,592 KB
testcase_49 AC 131 ms
15,692 KB
testcase_50 AC 134 ms
15,472 KB
testcase_51 AC 77 ms
15,200 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def solve_impl( a, b )
  lnn=b*Math.log(a)
  z=(lnn/Math.log(10)).floor
  base=(10*Math.exp( lnn-z*Math.log(10) )).floor.to_s
  [base[0], base[1], z ]
end

def solve2(input)
  n=input.gets.to_i
  n.times do
    q=input.gets.split(/\s+/).map(&:to_i)
    puts( solve_impl( *q ).join(" ") )
  end
end

solve2($stdin)
0