結果
問題 | No.456 Millions of Submits! |
ユーザー | tails |
提出日時 | 2016-12-08 00:56:58 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 441 bytes |
コンパイル時間 | 1,906 ms |
コンパイル使用メモリ | 24,980 KB |
実行使用メモリ | 4,384 KB |
最終ジャッジ日時 | 2023-09-05 09:49:06 |
合計ジャッジ時間 | 6,964 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 0 ms
4,376 KB |
testcase_01 | WA | - |
testcase_02 | AC | 1 ms
4,380 KB |
testcase_03 | AC | 0 ms
4,376 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | OLE | - |
コンパイルメッセージ
main.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int] main(){ ^~~~ main.c: In function ‘main’: main.c:3:2: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] scanf("%d",&m); ^~~~~ main.c:3:2: warning: incompatible implicit declaration of built-in function ‘scanf’ main.c:3:2: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:1:1: +#include <stdio.h> main(){ main.c:3:2: scanf("%d",&m); ^~~~~ main.c:9:6: warning: implicit declaration of function ‘pow’ [-Wimplicit-function-declaration] n=pow(t,1./a); ^~~ main.c:9:6: warning: incompatible implicit declaration of built-in function ‘pow’ main.c:9:6: note: include ‘<math.h>’ or provide a declaration of ‘pow’ main.c:1:1: +#include <math.h> main(){ main.c:9:6: n=pow(t,1./a); ^~~ main.c:11:6: warning: implicit declaration of function ‘exp’ [-Wimplicit-function-declaration] n=exp(pow(t,1./b)); ^~~ main.c:11:6: warning: incompatible implicit declaration of built-in function ‘exp’ main.c:11:6: note: include ‘<math.h>’ or provide a declaration of ‘exp’ main.c:11:10: warning: incompatible implicit declaration of built-in function ‘pow’ n=exp(pow(t,1./b)); ^~~ main.c:11:10: note: include ‘<math.h>’ or provide a declaration of ‘pow’ main.c:13:14: warning: implicit declaration of function ‘log’ [-Wimplicit-function-declaration] double lt=log(t); ^~~ main.c:13:14: warning: incompatible implicit declaration of built-in function ‘log’ main.c:13:14: note: include ‘<math.h>’ or provide a declaration of ‘log’ main.c:24:6: warning: incompatible implicit declaration of built-in function ‘exp’ n=exp(l); ^~~ main.c:24:6: note: include ‘<math.h>’ or provide a declaration of ‘exp’ main.c:26:3: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] printf("%.20f\n",n);
ソースコード
main(){ int m; scanf("%d",&m); while(m--){ int a,b,i; double t,n; scanf("%d%d%lf",&a,&b,&t); if(b==0){ n=pow(t,1./a); } else if(a==0){ n=exp(pow(t,1./b)); } else { double lt=log(t); double l=lt/a; for(i=30;i>0;--i){ l-=(a*l+b*log(l)-lt)/(a+b/l) /i; if(l<1e-10){ l=1e-10; } } for(i=0;i<20;++i){ l-=(a*l+b*log(l)-lt)/(a+b/l); } n=exp(l); } printf("%.20f\n",n); } return 0; }