結果

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

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#include <iomanip>
#include <map>
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;

int main(){
    LL N;
    cin >> N;
    for(int i = 0; i < N; i++){
        ULL A, B;
        cin >> A >> B;
        double r = log10(A) * B;
        ULL e = (ULL)(r);
        double v = pow(10, r-e);
        cout << (ULL)(v) << " " << (ULL)(v*10)-(ULL)(v)*10 << " " << e << endl;
    }
    return 0;
}
0