結果

問題 No.89 どんどんドーナツどーんといこう!
ユーザー mosmos_21mosmos_21
提出日時 2016-10-10 21:06:24
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 248 bytes
コンパイル時間 740 ms
コンパイル使用メモリ 20,992 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-05-01 19:03:10
合計ジャッジ時間 1,279 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <stdio.h>

int main(){
  // 2π² r² R
  int c,ri,ro;
  double r, R;
  double pi = 3.1415926535897932;

  scanf("%d%d%d", &c,&ri,&ro);
  r = (ro - ri) / 2;
  R = ri + r;
  printf("%lf\n", 2 * pi * pi * r * r * R * c);
  return 0;
}
0