結果

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

ソースコード

diff #

#include<iostream>
#include<cmath>

using namespace std;

int main(){

	int N;
	double A,B;

	cin>>N;

	while(N--){

		cin>>A>>B;

		double a=log10((double)A)*B;
		long long b=a;
		long long c=pow(10.0,(a-b))*100000000;

		while(c/100!=0) c/=10;

		cout<<c/10<<" "<<c%10<<" "<<b<<endl;
	}
}

0