結果

問題 No.89 どんどんドーナツどーんといこう!
ユーザー a2011404a2011404
提出日時 2017-03-15 16:37:42
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 434 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 22,912 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-15 19:45:09
合計ジャッジ時間 660 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
5,248 KB
testcase_01 AC 0 ms
5,376 KB
testcase_02 AC 0 ms
5,376 KB
testcase_03 AC 0 ms
5,376 KB
testcase_04 AC 0 ms
5,376 KB
testcase_05 AC 0 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 0 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 0 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:9:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |         scanf("%d %d %d",&c,&in,&out);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

#include <math.h>

int main(void){
	int in,out,c;
	double	r=0,r2=0;

	scanf("%d %d %d",&c,&in,&out);

	r=((out-in)/2.0);
	r2=((out-in)/2.0+in);
//	printf("r=%f\n",r);		r=断面半径
//	printf("r2=%f\n",r2);		r2=断面中央までの距離

	r=pow(r,2)*M_PI;
	r2=2.0*M_PI*r2;
//	printf("rr=%.10f\n",r);		r=断面積
//	printf("r2=%.10f\n",r2);	r2=断面中央での演習

	printf("%.10f\n",c*r*r2);


	return 0;
}
0