結果

問題 No.219 巨大数の概算
ユーザー face4
提出日時 2018-09-21 21:03:28
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 26 ms / 1,500 ms
コード長 407 bytes
コンパイル時間 453 ms
コンパイル使用メモリ 68,732 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-18 08:47:39
合計ジャッジ時間 3,638 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 51
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<cmath>
using namespace std;

typedef long long ll;

int main(){
    int n;
    cin >> n;

    int x, y, a, b;
    ll z;

    for(int i = 0; i < n; i++){
        cin >> a >> b;
        double l = log10(a) * b;
        z = l;
        l -= z;
        x = (pow(10, l) * 10);
        y = x%10;
        x /= 10;
        cout << x << " " << y << " " << z << endl;
    }

    return 0;
}
0