結果
問題 | No.456 Millions of Submits! |
ユーザー | tails |
提出日時 | 2016-12-08 02:06:03 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 1,223 ms / 4,500 ms |
コード長 | 339 bytes |
コンパイル時間 | 179 ms |
コンパイル使用メモリ | 21,632 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 03:12:50 |
合計ジャッジ時間 | 8,588 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,376 KB |
testcase_02 | AC | 0 ms
5,376 KB |
testcase_03 | AC | 0 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 | 2 ms
5,376 KB |
testcase_08 | AC | 2 ms
5,376 KB |
testcase_09 | AC | 14 ms
5,376 KB |
testcase_10 | AC | 12 ms
5,376 KB |
testcase_11 | AC | 123 ms
5,376 KB |
testcase_12 | AC | 1,223 ms
5,376 KB |
コンパイルメッセージ
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=0;i<20;++i){ l-=(a*l+b*log(l)-lt)/(a+b/l); } n=exp(l); } printf("%.10f\n",n); } return 0; }