結果

問題 No.219 巨大数の概算
ユーザー matsu7874matsu7874
提出日時 2015-10-03 18:53:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 383 bytes
コンパイル時間 324 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 8,116 KB
最終ジャッジ日時 2023-09-27 01:50:29
合計ジャッジ時間 12,291 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 161 ms
7,924 KB
testcase_01 AC 149 ms
7,896 KB
testcase_02 AC 150 ms
8,044 KB
testcase_03 AC 146 ms
7,960 KB
testcase_04 WA -
testcase_05 AC 15 ms
7,896 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 16 ms
7,956 KB
testcase_10 AC 156 ms
7,928 KB
testcase_11 AC 153 ms
7,928 KB
testcase_12 AC 149 ms
7,936 KB
testcase_13 AC 150 ms
7,928 KB
testcase_14 AC 152 ms
8,032 KB
testcase_15 AC 157 ms
7,964 KB
testcase_16 AC 153 ms
7,960 KB
testcase_17 AC 152 ms
7,924 KB
testcase_18 WA -
testcase_19 AC 153 ms
8,108 KB
testcase_20 AC 147 ms
7,904 KB
testcase_21 AC 151 ms
8,052 KB
testcase_22 WA -
testcase_23 AC 149 ms
7,968 KB
testcase_24 AC 151 ms
7,932 KB
testcase_25 AC 148 ms
7,968 KB
testcase_26 AC 154 ms
7,904 KB
testcase_27 AC 146 ms
7,904 KB
testcase_28 WA -
testcase_29 AC 154 ms
7,960 KB
testcase_30 AC 152 ms
7,920 KB
testcase_31 AC 155 ms
7,928 KB
testcase_32 AC 148 ms
7,972 KB
testcase_33 WA -
testcase_34 AC 150 ms
8,056 KB
testcase_35 AC 152 ms
8,052 KB
testcase_36 AC 149 ms
7,896 KB
testcase_37 WA -
testcase_38 AC 155 ms
7,904 KB
testcase_39 AC 151 ms
7,960 KB
testcase_40 WA -
testcase_41 AC 153 ms
7,928 KB
testcase_42 WA -
testcase_43 AC 150 ms
8,052 KB
testcase_44 WA -
testcase_45 AC 148 ms
7,952 KB
testcase_46 AC 146 ms
7,904 KB
testcase_47 AC 147 ms
7,924 KB
testcase_48 AC 150 ms
7,900 KB
testcase_49 AC 153 ms
7,964 KB
testcase_50 AC 149 ms
7,932 KB
testcase_51 AC 15 ms
7,960 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 = 9.9
    while l + 0.001 < 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)
    print(X, Y, Z)
0