結果

問題 No.456 Millions of Submits!
ユーザー testestesttestestest
提出日時 2016-12-08 08:37:38
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 1,958 ms / 4,500 ms
コード長 293 bytes
コンパイル時間 380 ms
コンパイル使用メモリ 24,924 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-05 12:37:30
合計ジャッジ時間 9,891 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 3 ms
4,376 KB
testcase_09 AC 21 ms
4,380 KB
testcase_10 AC 20 ms
4,380 KB
testcase_11 AC 197 ms
4,376 KB
testcase_12 AC 1,958 ms
4,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class
 a,b;
 ^
main.c:2:1: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int]
main.c:2:3: warning: type defaults to ‘int’ in declaration of ‘b’ [-Wimplicit-int]
 a,b;
   ^
main.c: In function ‘W’:
main.c:8:7: warning: implicit declaration of function ‘exp’ [-Wimplicit-function-declaration]
   t=m*exp(m);
       ^~~
main.c:8:7: warning: incompatible implicit declaration of built-in function ‘exp’
main.c:8:7: note: include ‘<math.h>’ or provide a declaration of ‘exp’
main.c:1:1:
+#include <math.h>
 double s;
main.c:8:7:
   t=m*exp(m);
       ^~~
main.c: At top level:
main.c:13:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 main(){
 ^~~~
main.c: In function ‘main’:
main.c:14:2: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration]
  gets(&s);
  ^~~~
main.c:15:8: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
  for(;~scanf("%d%d%lf",&a,&b,&s);)printf("%.10f\n",b?exp(a?W(pow(s,1./b)*a/b)*b/a:pow(s,1./b)):pow(s,1./a));
        ^~~~~
main.c:15:8: warning: incompatible implicit declaration of built-in function ‘scanf’
main.c:15:8: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
main.c:1:1:
+#include <stdio.h>
 double s;
main.c:15:8:
  for(;~scanf("%d%d%lf",&a,&b,&s);)printf("%.10f\n",b?exp(a?W(pow(s,1./b)*a/b)*b/a:pow(s,1./b)):pow(s,1./a));
        ^~~~~
main.c:15:35: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
  for(;~scanf("%d%d%lf",&a,&b,&s);)printf("%.10f\n",b?exp(a?W(pow(s,1./b)*a/b)*b/a:pow(s,1./b)):pow(s,1./a));
                                   ^~~~~~
main.c:15:35: warning: incompatible implicit declaration of built-in function ‘printf’
main.c:15:35: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
main.c:15:54: warning: incompatible implicit declaration of built

ソースコード

diff #

double s;
a,b;
double W(double x){
	double nl=0,nr=3.4,m,t;
	int i;
	for(i=0;i<50;i++){
		m=(nl+nr)/2;
		t=m*exp(m);
		t<x?nl=m:(nr=m);
	}
	return nr;
}
main(){
	gets(&s);
	for(;~scanf("%d%d%lf",&a,&b,&s);)printf("%.10f\n",b?exp(a?W(pow(s,1./b)*a/b)*b/a:pow(s,1./b)):pow(s,1./a));
	return 0;
}
0