結果
問題 | No.456 Millions of Submits! |
ユーザー | tails |
提出日時 | 2016-12-08 01:47:46 |
言語 | C90 (gcc 11.4.0) |
結果 |
OLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 495 bytes |
コンパイル時間 | 297 ms |
コンパイル使用メモリ | 22,016 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 03:12:29 |
合計ジャッジ時間 | 5,661 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,376 KB |
testcase_02 | AC | 1 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 | 3 ms
5,376 KB |
testcase_08 | AC | 3 ms
5,376 KB |
testcase_09 | AC | 24 ms
5,376 KB |
testcase_10 | AC | 24 ms
5,376 KB |
testcase_11 | AC | 231 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:27: warning: implicit declaration of function ‘exp’ [-Wimplicit-function-declaration] 11 | n=exp(pow(t,1./b)); | ^~~ main.c:11:27: note: include ‘<math.h>’ or provide a declaration of ‘exp’ main.c:11:27: warning: incompatible implicit declaration of built-in function ‘exp’ [-Wbuiltin-declaration-mismatch] main.c:11:27: note: include ‘<math.h>’ or provide a declaration of ‘exp’ main.c:11:31: warning: incompatible implicit declaration of built-in function ‘pow’ [-Wbuiltin-declaration-mismatch] 11 | n=exp(pow(t,1./b)); | ^~~ main.c:11:31: note: include ‘<math.h>’ or provide
ソースコード
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=0.1; for(i=30;i>0;--i){ if(l==0)exit(0); if(a+b/l==0)exit(0); l-=(a*l+b*log(l)-lt)/(a+b/l) /i; } for(i=0;i<20;++i){ if(l==0)exit(0); if(a+b/l==0)exit(0); l-=(a*l+b*log(l)-lt)/(a+b/l); } n=exp(l); } printf("%.20f\n",n); } return 0; }