結果

問題 No.553 AlphaCoder Rating
ユーザー 👑 testestesttestestest
提出日時 2017-11-06 05:15:05
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 2 ms / 1,500 ms
コード長 232 bytes
コンパイル時間 514 ms
コンパイル使用メモリ 29,184 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-03 05:40:33
合計ジャッジ時間 1,527 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
testcase_14 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
    1 | n,t;
      | ^
main.c:1:1: warning: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:3: warning: type defaults to 'int' in declaration of 't' [-Wimplicit-int]
    1 | n,t;
      |   ^
main.c:3:1: warning: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:4:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |         scanf("%d",&n);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | n,t;
main.c:4:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |         scanf("%d",&n);
      |         ^~~~~
main.c:4:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:23: warning: implicit declaration of function 'pow' [-Wimplicit-function-declaration]
    9 |                 nu+=r*pow(2,t/8e2);
      |                       ^~~
main.c:1:1: note: include '<math.h>' or provide a declaration of 'pow'
  +++ |+#include <math.h>
    1 | n,t;
main.c:9:23: warning: incompatible implicit declaration of built-in function 'pow' [-Wbuiltin-declaration-mismatch]
    9 |                 nu+=r*pow(2,t/8e2);
      |                       ^~~
main.c:9:23: note: include '<math.h>' or provide a declaration of 'pow'
main.c:13:12: warning: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   13 |         Fn=sqrt(co)/de;
      |            ^~~~
main.c:13:12: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:13:12: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
main.c:13:12: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:14:9: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   14 |         prin

ソースコード

diff #

n,t;
double r,de,nu,co,Fn;
main(){
	scanf("%d",&n);
	r=0.9;
	while(n--){
		scanf("%d",&t);
		de+=r;
		nu+=r*pow(2,t/8e2);
		co+=r*r;
		r*=0.9;
	}
	Fn=sqrt(co)/de;
	printf("%.f",800*log2(nu/de)-1200*(Fn-1/sqrt(19))/(1-1/sqrt(19)));
}
0