結果
問題 | No.456 Millions of Submits! |
ユーザー | testestest |
提出日時 | 2016-12-08 07:11:05 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 299 bytes |
コンパイル時間 | 910 ms |
コンパイル使用メモリ | 24,592 KB |
実行使用メモリ | 4,504 KB |
最終ジャッジ日時 | 2023-09-05 12:22:36 |
合計ジャッジ時間 | 6,918 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,380 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
コンパイルメッセージ
main.c:3:1: warning: data definition has no type or storage class a,b; ^ main.c:3:1: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int] main.c:3:3: warning: type defaults to ‘int’ in declaration of ‘b’ [-Wimplicit-int] a,b; ^ main.c:4:1: warning: return type defaults to ‘int’ [-Wimplicit-int] main(){ ^~~~ main.c: In function ‘main’: main.c:5:2: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration] gets(&s); ^~~~ main.c:6:8: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] for(;~scanf("%d%d%lf",&a,&b,&s);){ ^~~~~ main.c:6:8: warning: incompatible implicit declaration of built-in function ‘scanf’ main.c:6:8: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:1:1: +#include <stdio.h> //TLEしそう main.c:6:8: for(;~scanf("%d%d%lf",&a,&b,&s);){ ^~~~~ main.c:7:6: warning: implicit declaration of function ‘pow’ [-Wimplicit-function-declaration] nr=pow(s,1./a); ^~~ main.c:7:6: warning: incompatible implicit declaration of built-in function ‘pow’ main.c:7:6: note: include ‘<math.h>’ or provide a declaration of ‘pow’ main.c:1:1: +#include <math.h> //TLEしそう main.c:7:6: nr=pow(s,1./a); ^~~ main.c:8:14: warning: implicit declaration of function ‘exp’ [-Wimplicit-function-declaration] if(a==0)nr=exp(pow(s,1./b)); ^~~ main.c:8:14: warning: incompatible implicit declaration of built-in function ‘exp’ main.c:8:14: note: include ‘<math.h>’ or provide a declaration of ‘exp’ main.c:12:20: warning: implicit declaration of function ‘log’ [-Wimplicit-function-declaration] t=pow(m,a)*pow(log(m),b); ^~~ main.c:12:20: warning: incompatible implicit declaration of built-in function ‘log’ main.c:12:20: note: include ‘<math.h>’ or provide a declaration of ‘log’ main.c:16:3: warning: implicit declaration
ソースコード
//TLEしそう double nl,nr,m,s,t; a,b; main(){ gets(&s); for(;~scanf("%d%d%lf",&a,&b,&s);){ nr=pow(s,1./a); if(a==0)nr=exp(pow(s,1./b)); else if(b){ for(nl=1;nr-nl>1e-9;){ m=(nl+nr)/2; t=pow(m,a)*pow(log(m),b); t<s?nl=m:(nr=m); } } printf("%.9f\n",nr); } return 0; }