結果
問題 | No.456 Millions of Submits! |
ユーザー |
![]() |
提出日時 | 2017-06-21 10:45:36 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 967 ms / 4,500 ms |
コード長 | 544 bytes |
コンパイル時間 | 114 ms |
コンパイル使用メモリ | 23,936 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 03:14:53 |
合計ジャッジ時間 | 7,785 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
コンパイルメッセージ
main.c: In function ‘run’: main.c:20:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 20 | scanf("%d",&m); | ^~~~~~~~~~~~~~ main.c:25:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 25 | scanf("%d%d%lf",&a,&b,&t); | ^~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#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; }