結果

問題 No.219 巨大数の概算
ユーザー odan3240
提出日時 2016-06-09 20:35:16
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 26 ms / 1,500 ms
コード長 383 bytes
コンパイル時間 397 ms
コンパイル使用メモリ 61,160 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-18 12:14:06
合計ジャッジ時間 3,651 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 51
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdlib>
#include <vector>
#include <cmath>

using namespace std;
using ll = long long;

int main() {
    int N;
    ll a, b;
    cin >> N;
    while (N--) {
        cin >> a >> b;
        double t = b * log10(a);
        ll radix = (ll)t;
        ll ans = 10 * pow(10, t - radix);
        printf("%lld %lld %lld\n", ans / 10, ans % 10, radix);
    }
}
0