結果
| 問題 |
No.219 巨大数の概算
|
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2020-02-05 09:27:48 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 547 ms / 1,500 ms |
| コード長 | 435 bytes |
| コンパイル時間 | 108 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 44,716 KB |
| 最終ジャッジ日時 | 2024-09-22 04:16:14 |
| 合計ジャッジ時間 | 33,065 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 51 |
ソースコード
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np
N = int(readline())
AB = np.fromstring(read(), np.int64, sep=' ')
A = AB[::2]
B = AB[1::2]
L10 = np.log10(A) * B
Z = L10.astype(int)
x = np.exp((L10 - Z) * np.log(10))
X, Y = divmod((10*x).astype(int), 10)
answers = ('{} {} {}'.format(*values) for values in zip(X,Y,Z))
print('\n'.join(answers))
maspy