結果
| 問題 | 
                            No.89 どんどんドーナツどーんといこう!
                             | 
                    
| コンテスト | |
| ユーザー | 
                             funakoshi
                         | 
                    
| 提出日時 | 2019-09-05 10:35:53 | 
| 言語 | C  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 1 ms / 5,000 ms | 
| コード長 | 293 bytes | 
| コンパイル時間 | 1,517 ms | 
| コンパイル使用メモリ | 26,752 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2025-01-02 22:47:39 | 
| 合計ジャッジ時間 | 2,007 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 9 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:10:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |     scanf("%lf",&calorie);
      |     ^~~~~~~~~~~~~~~~~~~~~
main.c:11:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 |     scanf("%lf %lf",&a,&b);
      |     ^~~~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#define PI 3.141592
int main(void)
{
    double calorie,a,b;
    scanf("%lf",&calorie);
    scanf("%lf %lf",&a,&b);
    double ans = calorie*(PI*PI/4*(a+b)*(b-a)*(b-a));
    printf("%lf",ans);
}
            
            
            
        
            
funakoshi