結果

問題 No.219 巨大数の概算
コンテスト
ユーザー FF256grhy
提出日時 2015-05-30 00:06:11
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 376 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 224 ms
コンパイル使用メモリ 50,204 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2026-03-28 01:26:40
合計ジャッジ時間 6,552 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other WA * 51
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <stdio.h>
#include <math.h>

//誤差なんも考えてない

int main(void) {
	int n, i;
	scanf("%d", &n);
	for(i = 0; i < n; i++) {
		int a, b;
		scanf("%d%d", &a, &b);
		double d = b * log10(a);
		int z = floor(d);
		double base = pow(10, d - floor(d));
		int x = floor(base), y = ( (int) floor(base * 10) ) % 10;
		printf("%d %d %d\n", x, y, z);
	}
	return 0;
}
0