結果

問題 No.219 巨大数の概算
コンテスト
ユーザー ayaoni
提出日時 2020-12-10 21:53:55
言語 PyPy3
(7.3.23 + ac-library)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 79 ms / 1,500 ms
+ 723µs
コード長 721 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 213 ms
コンパイル使用メモリ 96,076 KB
実行使用メモリ 85,056 KB
最終ジャッジ日時 2026-08-31 08:45:15
合計ジャッジ時間 8,898 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 51
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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