結果
| 問題 | No.456 Millions of Submits! |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2016-12-08 08:37:38 |
| 言語 | C90(gcc15) (gcc 15.2.0) |
| 結果 |
AC
|
| 実行時間 | 1,582 ms / 4,500 ms |
| コード長 | 293 bytes |
| 記録 | |
| コンパイル時間 | 194 ms |
| コンパイル使用メモリ | 36,864 KB |
| 最終ジャッジ日時 | 2026-02-23 23:23:42 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class
2 | a,b;
| ^
main.c: In function 'W':
main.c:8:21: warning: incompatible implicit declaration of built-in function 'exp' [-Wbuiltin-declaration-mismatch]
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: In function 'main':
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:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | double s;
main.c:15:42: warning: incompatible implicit declaration of built-in function 'printf' [-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:42: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:15:61: warning: incompatible implicit declaration of built-in function 'exp' [-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:61: note: include '<math.h>' or provide a declaration of 'exp'
main.c:15:69: warning: incompatible implicit declaration of built-in function 'pow' [-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:69: note: include '<math.h>' or provide a declaration of 'pow'
/usr/bin/ld:
ソースコード
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;
}
testestest