結果

問題 No.219 巨大数の概算
ユーザー kotatsugame
提出日時 2019-10-12 05:50:12
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 8 ms / 1,500 ms
コード長 275 bytes
コンパイル時間 247 ms
コンパイル使用メモリ 38,272 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-27 03:38:27
合計ジャッジ時間 2,954 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 51
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main()
      | ^~~~

ソースコード

diff #

#include<cstdio>
#include<cmath>
using namespace std;
main()
{
	int N;scanf("%d",&N);
	for(;N--;)
	{
		int A,B;scanf("%d%d",&A,&B);
		double x=B*log10(A);
		long Z=floor(x);
		double Q=pow(10,x-Z);
		printf("%d %d %ld\n",(int)floor(Q),(int)(floor(Q*10)-floor(Q)*10),Z);
	}
}
0