結果
問題 | No.456 Millions of Submits! |
ユーザー |
👑 ![]() |
提出日時 | 2016-12-08 08:37:38 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1,655 ms / 4,500 ms |
コード長 | 293 bytes |
コンパイル時間 | 172 ms |
コンパイル使用メモリ | 22,144 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 03:12:47 |
合計ジャッジ時間 | 9,035 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class 2 | 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] 2 | a,b; | ^ main.c: In function ‘W’: main.c:8:21: warning: implicit declaration of function ‘exp’ [-Wimplicit-function-declaration] 8 | t=m*exp(m); | ^~~ main.c:1:1: note: include ‘<math.h>’ or provide a declaration of ‘exp’ +++ |+#include <math.h> 1 | double s; main.c:8:21: warning: incompatible implicit declaration of built-in function ‘exp’ [-Wbuiltin-declaration-mismatch] 8 | t=m*exp(m); | ^~~ main.c:8:21: note: include ‘<math.h>’ or provide a declaration of ‘exp’ main.c: At top level: main.c:13:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 13 | main(){ | ^~~~ main.c: In function ‘main’: main.c:14:9: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration] 14 | gets(&s); | ^~~~ main.c:15:15: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 15 | 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:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | double s; main.c:15:15: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 15 | 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:15: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:15:42: warning: implicit declaration of function ‘printf’ [-Wim
ソースコード
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;}