結果
問題 | No.89 どんどんドーナツどーんといこう! |
ユーザー |
![]() |
提出日時 | 2017-01-23 08:35:56 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 337 bytes |
コンパイル時間 | 1,047 ms |
コンパイル使用メモリ | 22,784 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-05 23:06:48 |
合計ジャッジ時間 | 1,453 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
コンパイルメッセージ
main.c: In function ‘run’: main.c:11:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%d",&c); | ^~~~~~~~~~~~~~ main.c:13:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 13 | scanf("%d%d",&in,&out); | ^~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>#include<math.h>double pappus(int c,int in,int out){double r=(double)(out-in)*0.5;return c*2*M_PI*(in+r)*(M_PI*r*r);}void run(void){int c;scanf("%d",&c);int in,out;scanf("%d%d",&in,&out);double ans=pappus(c,in,out);printf("%.5lf\n",ans);return;}int main(void){run();return 0;}