結果
| 問題 | No.456 Millions of Submits! |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2016-12-08 09:52:40 |
| 言語 | C90(gcc15) (gcc 15.2.0) |
| 結果 |
AC
|
| 実行時間 | 2,873 ms / 4,500 ms |
| コード長 | 358 bytes |
| 記録 | |
| コンパイル時間 | 164 ms |
| コンパイル使用メモリ | 36,736 KB |
| 最終ジャッジ日時 | 2026-02-23 23:24:05 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
| 純コード判定しない問題か言語 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
コンパイルメッセージ
main.c: In function 'main':
main.c:4:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
4 | scanf("%d",&m);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | main(){
main.c:7:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
7 | if(b==0)printf("%.10f\n",pow(t,1./a));
| ^~~~~~
main.c:7:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:42: warning: incompatible implicit declaration of built-in function 'pow' [-Wbuiltin-declaration-mismatch]
7 | if(b==0)printf("%.10f\n",pow(t,1./a));
| ^~~
main.c:1:1: note: include '<math.h>' or provide a declaration of 'pow'
+++ |+#include <math.h>
1 | main(){
main.c:8:47: warning: incompatible implicit declaration of built-in function 'exp' [-Wbuiltin-declaration-mismatch]
8 | else if(a==0)printf("%.10f\n",exp(pow(t,1./b)));
| ^~~
main.c:8:47: note: include '<math.h>' or provide a declaration of 'exp'
main.c:14:49: warning: incompatible implicit declaration of built-in function 'log' [-Wbuiltin-declaration-mismatch]
14 | fm=pow(m,a)*pow(log(m),b);
| ^~~
main.c:14:49: note: include '<math.h>' or provide a declaration of 'log'
ソースコード
main(){
int a,b,m;
double t;
scanf("%d",&m);
while(m--){
scanf("%d%d%lf",&a,&b,&t);
if(b==0)printf("%.10f\n",pow(t,1./a));
else if(a==0)printf("%.10f\n",exp(pow(t,1./b)));
else{
int i;
double nl=1,nr=5.8,m,fm;
for(i=0;i<33;i++){
m=(nl+nr)/2;
fm=pow(m,a)*pow(log(m),b);
fm<t?nl=m:(nr=m);
}
printf("%.10f\n",m);
}
}
}
testestest