結果

問題 No.219 巨大数の概算
ユーザー hanorver
提出日時 2015-10-09 07:53:07
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 352 bytes
コンパイル時間 540 ms
コンパイル使用メモリ 58,356 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-20 02:21:12
合計ジャッジ時間 10,439 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other WA * 51
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<cmath>

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

	for (int i = 0; i < n; i++) {
		int a, b;
		std::cin >> a >> b;

		double p = log10(a) * b;
		double q = pow(10, p - static_cast<int>(p));
		int x = static_cast<int>(q);
		int y = (int((q * 10)) % 10);
		std::cout << x << " " << y << " " << int(p) << std::endl;
	}
	return 0;
}
0