結果
| 問題 |
No.219 巨大数の概算
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 18:45:27 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 493 bytes |
| コンパイル時間 | 161 ms |
| コンパイル使用メモリ | 82,128 KB |
| 実行使用メモリ | 104,084 KB |
| 最終ジャッジ日時 | 2025-06-12 18:45:37 |
| 合計ジャッジ時間 | 5,918 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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))
gew1fw