結果

問題 No.219 巨大数の概算
ユーザー matsu7874
提出日時 2015-10-03 18:48:14
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 344 bytes
コンパイル時間 582 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-19 19:25:48
合計ジャッジ時間 17,115 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 2 WA * 49
権限があれば一括ダウンロードができます

ソースコード

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.1<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