結果

問題 No.456 Millions of Submits!
ユーザー akakimidoriakakimidori
提出日時 2017-06-21 10:45:36
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 1,178 ms / 4,500 ms
コード長 544 bytes
コンパイル時間 1,503 ms
コンパイル使用メモリ 26,008 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-05 23:49:07
合計ジャッジ時間 9,344 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 0 ms
4,376 KB
testcase_03 AC 0 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 3 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 13 ms
4,376 KB
testcase_10 AC 13 ms
4,380 KB
testcase_11 AC 121 ms
4,380 KB
testcase_12 AC 1,178 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

double calc(int a,int b,double t){
  if(a==0) return exp(pow(t,(double)1/b));
  if(b==0) return pow(t,(double)1/a);

  double x=log(11);
  int i;
  for(i=0;i<10;i++){
    double f=a*exp(x)+b*x-log(t);
    double g=a*exp(x)+b;
    x-=f/g;
  }
  return exp(exp(x));
}

void run(void){
  int m;
  scanf("%d",&m);
  int i;
  for(i=0;i<m;i++){
    int a,b;
    double t;
    scanf("%d%d%lf",&a,&b,&t);
    double ans=calc(a,b,t);
    printf("%.9lf\n",ans);
  }
  return;
}

int main(void){
  run();
  return 0;
}
0