結果
問題 | No.219 巨大数の概算 |
ユーザー |
![]() |
提出日時 | 2020-12-25 00:21:44 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 37 ms / 1,500 ms |
コード長 | 363 bytes |
コンパイル時間 | 2,355 ms |
コンパイル使用メモリ | 192,912 KB |
最終ジャッジ日時 | 2025-01-17 06:47:29 |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 51 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll N; cin >> N; while (N--) { ll A, B; cin >> A >> B; long double logAB = B * log10((long double)A); ll ans = pow(10, logAB - (ll)logAB + 1 + 1e-8) + 1e-8; cout << ans / 10 << " " << ans % 10 << " " << (ll)logAB << endl; } }