結果

問題 No.219 巨大数の概算
ユーザー matsu7874matsu7874
提出日時 2015-10-03 18:59:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 169 ms / 1,500 ms
コード長 422 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 10,720 KB
実行使用メモリ 8,116 KB
最終ジャッジ日時 2023-09-25 14:53:51
合計ジャッジ時間 11,277 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 163 ms
8,008 KB
testcase_01 AC 167 ms
8,068 KB
testcase_02 AC 164 ms
7,972 KB
testcase_03 AC 163 ms
8,016 KB
testcase_04 AC 164 ms
8,060 KB
testcase_05 AC 16 ms
7,976 KB
testcase_06 AC 31 ms
7,900 KB
testcase_07 AC 16 ms
8,112 KB
testcase_08 AC 31 ms
8,116 KB
testcase_09 AC 16 ms
7,904 KB
testcase_10 AC 164 ms
7,988 KB
testcase_11 AC 167 ms
8,104 KB
testcase_12 AC 165 ms
7,936 KB
testcase_13 AC 165 ms
7,984 KB
testcase_14 AC 164 ms
7,980 KB
testcase_15 AC 169 ms
7,968 KB
testcase_16 AC 163 ms
8,056 KB
testcase_17 AC 163 ms
7,980 KB
testcase_18 AC 164 ms
7,944 KB
testcase_19 AC 164 ms
8,012 KB
testcase_20 AC 162 ms
7,980 KB
testcase_21 AC 165 ms
7,920 KB
testcase_22 AC 163 ms
8,032 KB
testcase_23 AC 166 ms
7,940 KB
testcase_24 AC 167 ms
7,900 KB
testcase_25 AC 165 ms
8,036 KB
testcase_26 AC 165 ms
7,984 KB
testcase_27 AC 166 ms
8,040 KB
testcase_28 AC 168 ms
7,900 KB
testcase_29 AC 165 ms
8,092 KB
testcase_30 AC 164 ms
7,948 KB
testcase_31 AC 165 ms
7,896 KB
testcase_32 AC 168 ms
7,896 KB
testcase_33 AC 166 ms
7,924 KB
testcase_34 AC 167 ms
7,900 KB
testcase_35 AC 164 ms
8,008 KB
testcase_36 AC 164 ms
7,920 KB
testcase_37 AC 163 ms
7,992 KB
testcase_38 AC 166 ms
7,896 KB
testcase_39 AC 168 ms
7,960 KB
testcase_40 AC 165 ms
7,984 KB
testcase_41 AC 168 ms
7,980 KB
testcase_42 AC 167 ms
7,960 KB
testcase_43 AC 167 ms
8,040 KB
testcase_44 AC 166 ms
7,972 KB
testcase_45 AC 163 ms
8,012 KB
testcase_46 AC 159 ms
8,016 KB
testcase_47 AC 161 ms
7,980 KB
testcase_48 AC 164 ms
8,012 KB
testcase_49 AC 159 ms
7,904 KB
testcase_50 AC 163 ms
8,112 KB
testcase_51 AC 15 ms
7,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
N = int(input())
for i in range(N):
    A, B = map(int, input().split())
    log = math.log10(A) * B
    Z = int(log)
    xy = log - Z
    l = 0.0
    r = 10.0
    while l + 0.0001 < r:
        m = (l + r) / 2
        t = math.log10(m)
        if t < xy:
            l = m
        elif xy <= t:
            r = m
    X = int(l)
    Y = int((l - X) * 10)
    if X==0:
        X=1
        Y=0
    print(X, Y, Z)
0