結果
問題 |
No.89 どんどんドーナツどーんといこう!
|
ユーザー |
|
提出日時 | 2017-03-15 16:37:42 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 434 bytes |
コンパイル時間 | 641 ms |
コンパイル使用メモリ | 22,784 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-05 23:11:58 |
合計ジャッジ時間 | 1,321 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
コンパイルメッセージ
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); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#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; }