結果

問題 No.219 巨大数の概算
ユーザー naimonon77
提出日時 2016-02-09 19:51:33
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 43 ms / 1,500 ms
コード長 501 bytes
コンパイル時間 1,208 ms
コンパイル使用メモリ 158,296 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-18 11:56:30
合計ジャッジ時間 4,846 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 51
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <string>
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;

int main() {
  int i,j,k;
  int n;
  ld a,b,iptr1,iptr2; // iptr は整数部分
  int ans = 0;
  cin >> n;
  while(cin >> a >> b) {
	ld c = b*log10(a);
	c = modfl(c, &iptr1);
	c = powl(10,c);
	c = modfl(c, &iptr2);
	c *= 10;
	printf("%.0Lf %d %.0Lf\n",iptr2,(int)c,iptr1);
  }
  return 0;
}
0