結果

問題 No.219 巨大数の概算
ユーザー ayaoni
提出日時 2020-12-10 21:53:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 1,500 ms
コード長 721 bytes
コンパイル時間 220 ms
コンパイル使用メモリ 82,516 KB
実行使用メモリ 77,184 KB
最終ジャッジ日時 2024-09-19 20:44:08
合計ジャッジ時間 7,261 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 51
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from math import log10
sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())


L = [0]+[log10(i/10) for i in range(1,100)]

N = I()
for _ in range(N):
    A,B = MI()
    W = B*log10(A)
    Z = int(W)
    XY = W-Z
    X,Y = 1,0
    for i in range(10,100):
        if L[i] <= XY:
            X,Y = divmod(i,10)
    print(X,Y,Z)
0