結果

問題 No.219 巨大数の概算
ユーザー krotonkroton
提出日時 2015-05-29 21:46:48
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 29 ms / 1,500 ms
コード長 397 bytes
コンパイル時間 1,101 ms
コンパイル使用メモリ 159,200 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-18 10:31:28
合計ジャッジ時間 4,361 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 51
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

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

    for(int i=0;i<N;i++){
        int A, B;
        cin >> A >> B;

        long double l = log(A) * B / log(10);
        ll Z = l;
        int t = pow(10, l - Z + 1);
        int X = t / 10;
        int Y = t % 10;

        cout << X << " " << Y << " " << Z << endl;
    }

    return 0;
}
0