結果
| 問題 | No.89 どんどんドーナツどーんといこう! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-03-15 16:37:42 |
| 言語 | C90(gcc15) (gcc 15.2.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 434 bytes |
| 記録 | |
| コンパイル時間 | 139 ms |
| コンパイル使用メモリ | 27,524 KB |
| 最終ジャッジ日時 | 2026-02-24 00:31:42 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c: In function 'main':
main.c:13:1: error: C++ style comments are not allowed in ISO C90
13 | // printf("r=%f\n",r); r=断面半径
| ^
main.c:13:1: note: (this will be reported only once per input file)
main.c:16:20: error: 'M_PI' undeclared (first use in this function)
16 | r=pow(r,2)*M_PI;
| ^~~~
main.c:16:20: note: each undeclared identifier is reported only once for each function it appears in
ソースコード
#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;
}