結果
問題 | No.219 巨大数の概算 |
ユーザー |
![]() |
提出日時 | 2025-06-12 13:45:38 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 493 bytes |
コンパイル時間 | 158 ms |
コンパイル使用メモリ | 82,668 KB |
実行使用メモリ | 104,408 KB |
最終ジャッジ日時 | 2025-06-12 13:46:34 |
合計ジャッジ時間 | 6,025 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 1 |
other | TLE * 1 -- * 50 |
ソースコード
from decimal import Decimal, getcontext getcontext().prec = 100 # Set a high precision to handle very large exponents accurately. ln_10 = Decimal(10).ln() n = int(input()) for _ in range(n): a, b = map(int, input().split()) A = Decimal(a) ln_A = A.ln() log10_A = ln_A / ln_10 log_val = log10_A * b z = log_val // 1 f = log_val - z M = Decimal(10) ** f M_times_10 = M * 10 xy = int(M_times_10) x = xy // 10 y = xy % 10 print(x, y, int(z))