結果

問題 No.219 巨大数の概算
コンテスト
ユーザー alpha_virginis
提出日時 2015-05-29 23:31:28
言語 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  
実行時間 -
コード長 592 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 903 ms
コンパイル使用メモリ 176,396 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2026-03-28 01:18:35
合計ジャッジ時間 7,386 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other WA * 51
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>

inline long nextInt(void) {
  long temp;
  std::cin >> temp;
  return temp;
}


int main() {

  long N;
  long A, B;
  double temp;
  long X, Y, Z;

  std::cin >> N;
  
  for(int i = 0; i < N; ++i) {
    std::cin >> A >> B;
    temp = B * log10(A);
    Z = (int)temp;
    temp -= (int)temp;
    //std::cout << "temp" << temp << std::endl;;
    for(int i = 10; i < 100; ++i) {
      //std::cout << -log10(i/100.0) << std::endl;
      if( temp > -log10(i/100.0) ) {
	std::cout << i/10 << " " << i%10 << " " << Z << std::endl;
	break;
      }
    }
  }

  return 0;
}

0