結果

問題 No.219 巨大数の概算
ユーザー data9824
提出日時 2015-05-29 23:25:08
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 372 bytes
コンパイル時間 501 ms
コンパイル使用メモリ 60,596 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-06 12:07:10
合計ジャッジ時間 8,244 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other WA * 51
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cmath>

using namespace std;

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