結果

問題 No.219 巨大数の概算
ユーザー gew1fw
提出日時 2025-06-12 14:09:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 87 ms / 1,500 ms
コード長 452 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 79,180 KB
最終ジャッジ日時 2025-06-12 14:10:19
合計ジャッジ時間 6,660 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 51
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
import sys

def main():
    input = sys.stdin.read().split()
    n = int(input[0])
    idx = 1
    for _ in range(n):
        a = int(input[idx])
        b = int(input[idx + 1])
        idx += 2
        
        log_val = b * math.log10(a)
        f, k = math.modf(log_val)
        k = int(k)
        m = 10 ** f
        
        x = int(m)
        y = int(m * 10) % 10
        
        print(x, y, k)

if __name__ == '__main__':
    main()
0