結果
問題 | No.456 Millions of Submits! |
ユーザー | 👑 testestest |
提出日時 | 2016-12-08 08:58:56 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 1,403 ms / 4,500 ms |
コード長 | 379 bytes |
コンパイル時間 | 245 ms |
コンパイル使用メモリ | 22,784 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-26 03:12:56 |
合計ジャッジ時間 | 8,970 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
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 | 2 ms
5,376 KB |
testcase_08 | AC | 2 ms
5,376 KB |
testcase_09 | AC | 15 ms
5,376 KB |
testcase_10 | AC | 16 ms
5,376 KB |
testcase_11 | AC | 148 ms
5,376 KB |
testcase_12 | AC | 1,403 ms
6,944 KB |
コンパイルメッセージ
main.c: In function ‘W’: main.c:6:21: warning: implicit declaration of function ‘exp’ [-Wimplicit-function-declaration] 6 | t=m*exp(m); | ^~~ main.c:1:1: note: include ‘<math.h>’ or provide a declaration of ‘exp’ +++ |+#include <math.h> 1 | double W(double x){ main.c:6:21: warning: incompatible implicit declaration of built-in function ‘exp’ [-Wbuiltin-declaration-mismatch] 6 | t=m*exp(m); | ^~~ main.c:6:21: note: include ‘<math.h>’ or provide a declaration of ‘exp’ main.c: At top level: main.c:11:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 11 | main(){ | ^~~~ main.c: In function ‘main’: main.c:14:9: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 14 | scanf("%*d"); | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | double W(double x){ main.c:14:9: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 14 | scanf("%*d"); | ^~~~~ main.c:14:9: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:16:25: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 16 | if(b==0)printf("%.10f\n",pow(s,1./a)); | ^~~~~~ main.c:16:25: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:16:25: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] main.c:16:25: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:16:42: warning: implicit declaration of function ‘pow’ [-Wimplicit-function-declaration] 16 | if(b==0)printf("%.10f\n",pow(s,1./a)); |
ソースコード
double W(double x){ double nl=0,nr=3.4,m,t; int i; for(i=0;i<36;i++){ m=(nl+nr)/2; t=m*exp(m); t<x?nl=m:(nr=m); } return nr; } main(){ double s; int a,b; scanf("%*d"); for(;~scanf("%d%d%lf",&a,&b,&s);){ if(b==0)printf("%.10f\n",pow(s,1./a)); else if(a==0)printf("%.10f\n",exp(pow(s,1./b))); else printf("%.10f\n",exp(W(pow(s,1./b)*a/b)*b/a)); } return 0; }