結果
問題 | No.456 Millions of Submits! |
ユーザー | tails |
提出日時 | 2016-12-08 00:40:38 |
言語 | C90 (gcc 11.4.0) |
結果 |
OLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 359 bytes |
コンパイル時間 | 366 ms |
コンパイル使用メモリ | 21,504 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 03:12:28 |
合計ジャッジ時間 | 6,503 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 2 ms
5,376 KB |
testcase_02 | AC | 2 ms
5,376 KB |
testcase_03 | AC | 1 ms
5,376 KB |
testcase_04 | AC | 1 ms
5,376 KB |
testcase_05 | AC | 1 ms
5,376 KB |
testcase_06 | AC | 1 ms
5,376 KB |
testcase_07 | AC | 4 ms
5,376 KB |
testcase_08 | AC | 4 ms
5,376 KB |
testcase_09 | AC | 29 ms
5,376 KB |
testcase_10 | AC | 29 ms
5,376 KB |
testcase_11 | AC | 277 ms
5,376 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:11:35: warning: implicit declaration of function ‘log’ [-Wimplicit-function-declaration] 11 | double lt=log(t); | ^~~ main.c:11:35: note: include ‘<math.h>’ or provide a declaration of ‘log’ main.c:11:35: warning: incompatible implicit declaration of built-in function ‘log’ [-Wbuiltin-declaration-mismatch] main.c:11:35: note: include ‘<math.h>’ or provide a declaration of ‘log’ main.c:19:27: warning: implicit declaration of function ‘exp’ [-Wimplicit-function-declaration] 19 | n=exp(l); | ^~~ main.c:19:27: note: include ‘<math.h>’ or provide a declaration of ‘exp’ m
ソースコード
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 lt=log(t); double l=1; for(i=40;i>0;--i){ l-=(a*l+b*log(l)-lt)/(a+b/l) /i; } 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; }