結果
問題 | No.456 Millions of Submits! |
ユーザー | tails |
提出日時 | 2016-12-08 00:29:25 |
言語 | C90 (gcc 11.4.0) |
結果 |
OLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 346 bytes |
コンパイル時間 | 93 ms |
コンパイル使用メモリ | 21,504 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-26 03:12:04 |
合計ジャッジ時間 | 6,855 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 0 ms
6,816 KB |
testcase_01 | AC | 1 ms
6,940 KB |
testcase_02 | AC | 0 ms
6,944 KB |
testcase_03 | AC | 1 ms
6,944 KB |
testcase_04 | AC | 0 ms
6,940 KB |
testcase_05 | AC | 1 ms
6,944 KB |
testcase_06 | AC | 1 ms
6,940 KB |
testcase_07 | AC | 3 ms
6,940 KB |
testcase_08 | AC | 3 ms
6,944 KB |
testcase_09 | AC | 22 ms
6,944 KB |
testcase_10 | AC | 21 ms
6,940 KB |
testcase_11 | AC | 208 ms
6,940 KB |
testcase_12 | OLE | - |
コンパイルメッセージ
main.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | main(){ | ^~~~ main.c: In function ‘main’: main.c:3:9: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 3 | scanf("%d",&m); | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | main(){ main.c:3:9: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 3 | scanf("%d",&m); | ^~~~~ main.c:3:9: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:9:27: warning: implicit declaration of function ‘pow’ [-Wimplicit-function-declaration] 9 | n=pow(t,1./a); | ^~~ main.c:1:1: note: include ‘<math.h>’ or provide a declaration of ‘pow’ +++ |+#include <math.h> 1 | main(){ main.c:9:27: warning: incompatible implicit declaration of built-in function ‘pow’ [-Wbuiltin-declaration-mismatch] 9 | n=pow(t,1./a); | ^~~ main.c:9:27: note: include ‘<math.h>’ or provide a declaration of ‘pow’ main.c:13:43: warning: implicit declaration of function ‘log’ [-Wimplicit-function-declaration] 13 | l-=(a*l+b*log(l)-log(t))/(a+b/l) /i; | ^~~ main.c:13:43: note: include ‘<math.h>’ or provide a declaration of ‘log’ main.c:13:43: warning: incompatible implicit declaration of built-in function ‘log’ [-Wbuiltin-declaration-mismatch] main.c:13:43: note: include ‘<math.h>’ or provide a declaration of ‘log’ main.c:16:43: warning: incompatible implicit declaration of built-in function ‘log’ [-Wbuiltin-declaration-mismatch] 16 | l-=(a*l+b*log(l)-log(t))/(a+b/l); |
ソースコード
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 { double l=1; for(i=20;i>0;--i){ l-=(a*l+b*log(l)-log(t))/(a+b/l) /i; } for(i=0;i<20;++i){ l-=(a*l+b*log(l)-log(t))/(a+b/l); } n=exp(l); } printf("%.20f\n",n); } return 0; }