結果
| 問題 |
No.219 巨大数の概算
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-15 22:38:19 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 520 bytes |
| コンパイル時間 | 273 ms |
| コンパイル使用メモリ | 81,980 KB |
| 実行使用メモリ | 92,500 KB |
| 最終ジャッジ日時 | 2025-04-15 22:40:59 |
| 合計ジャッジ時間 | 45,680 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 6 TLE * 45 |
ソースコード
import decimal
from decimal import Decimal, ROUND_FLOOR
decimal.getcontext().prec = 25 # Sufficient precision to handle large exponents
n = int(input())
for _ in range(n):
a, b = map(int, input().split())
log10_a = Decimal(a).log10()
log10_val = log10_a * Decimal(b)
z = log10_val // 1
f = log10_val - z
v = Decimal(10) ** f
v_rounded = v.quantize(Decimal('0.1'), rounding=ROUND_FLOOR)
x = int(v_rounded // 1)
y = int((v_rounded % 1) * 10)
z_int = int(z)
print(x, y, z_int)
lam6er