結果
| 問題 | No.456 Millions of Submits! |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2016-12-08 08:58:56 |
| 言語 | C90 (gcc 12.3.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 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
コンパイルメッセージ
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;
}
testestest