結果

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

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <utility>
#include <string>
#include <cmath>

using namespace std;

int main() {
	long long a, b;
	int n;
	int x, y;
	long long z;

	cin >> n;
	double loglog, tmp;
	for (int i = 0; i < n; i++) {
		cin >> a >> b;

		loglog = 1.0 * b * log10(a);
		z = loglog;
		tmp = pow(10, loglog - z);
		x = tmp;
		y = (tmp - x) * 10;

		printf("%d %d %lld\n", x, y, z);
	}

	return 0;
}
0