結果
問題 | No.89 どんどんドーナツどーんといこう! |
ユーザー |
![]() |
提出日時 | 2019-01-21 21:29:15 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 418 bytes |
コンパイル時間 | 606 ms |
コンパイル使用メモリ | 28,800 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-05 23:33:21 |
合計ジャッジ時間 | 982 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
ソースコード
#include <stdio.h>#include <math.h>int main(void){char c,rin,rout;double smallR,largeR,cal;scanf("%hhd",&c);scanf("%hhd %hhd",&rin,&rout);smallR = (rout - rin) / 2.0;#ifdef M_PIlargeR = (rin + smallR) * 2.0 * M_PI;cal = smallR * smallR * M_PI * largeR * c;#elselargeR = (rin + smallR) * 2.0 * 3.141592;cal = smallR * smallR * 3.141592 * largeR * c;#endifprintf("%f\n",cal);return 0;}