結果

問題 No.219 巨大数の概算
ユーザー tnoda_
提出日時 2015-08-24 19:13:48
言語 Python2
(2.7.18)
結果
AC  
実行時間 59 ms / 1,500 ms
コード長 276 bytes
コンパイル時間 42 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,784 KB
最終ジャッジ日時 2024-07-18 11:22:43
合計ジャッジ時間 5,165 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 51
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import log10


def solve():
    A, B = map(int, raw_input().split())
    a = log10(A)
    Z = int(a * B)
    xy = 10 ** (a * B - Z)
    X = int(xy)
    Y = int(xy * 10) % 10
    return ' '.join(map(str, [X, Y, Z]))

N = input()
for i in xrange(N):
    print(solve())
0