結果

問題 No.219 巨大数の概算
ユーザー maine_honzuki
提出日時 2020-12-25 00:22:19
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 36 ms / 1,500 ms
コード長 349 bytes
コンパイル時間 1,813 ms
コンパイル使用メモリ 192,640 KB
最終ジャッジ日時 2025-01-17 06:48:11
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 51
権限があれば一括ダウンロードができます

ソースコード

diff #

#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);
        cout << ans / 10 << " " << ans % 10 << " " << (ll)logAB << endl;
    }
}
0