結果
| 問題 | No.456 Millions of Submits! |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2016-12-08 08:58:56 |
| 言語 | C90 (gcc 15.2.0) |
| 結果 |
AC
|
| 実行時間 | 1,319 ms / 4,500 ms |
| コード長 | 379 bytes |
| 記録 | |
| コンパイル時間 | 608 ms |
| コンパイル使用メモリ | 36,916 KB |
| 最終ジャッジ日時 | 2026-02-23 23:23:52 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
コンパイルメッセージ
main.c: In function 'W':
main.c:6:21: warning: incompatible implicit declaration of built-in function 'exp' [-Wbuiltin-declaration-mismatch]
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: In function 'main':
main.c:14:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
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:16:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
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:42: warning: incompatible implicit declaration of built-in function 'pow' [-Wbuiltin-declaration-mismatch]
16 | if(b==0)printf("%.10f\n",pow(s,1./a));
| ^~~
main.c:16:42: note: include '<math.h>' or provide a declaration of 'pow'
main.c:17:47: warning: incompatible implicit declaration of built-in function 'exp' [-Wbuiltin-declaration-mismatch]
17 | else if(a==0)printf("%.10f\n",exp(pow(s,1./b)));
| ^~~
main.c:17:47: note: include '<math.h>' or provide a declaration of 'exp'
ソースコード
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;
}
testestest