結果
| 問題 | 
                            No.89 どんどんドーナツどーんといこう!
                             | 
                    
| コンテスト | |
| ユーザー | 
                             kaito_tateyama
                         | 
                    
| 提出日時 | 2017-08-16 14:49:57 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 545 bytes | 
| コンパイル時間 | 1,571 ms | 
| コンパイル使用メモリ | 165,932 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-10-05 23:17:22 | 
| 合計ジャッジ時間 | 2,097 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 9 | 
ソースコード
#include <bits/stdc++.h>
//---------------------------
using namespace std;
//---------------------------
#define REP(i,n) for(int i = 0; i < (n); i++)
#define P(x) cout << (x) << "\n"
//---------------------------
double torus(int r1,int r2){
  double p = 3.14159265358979323846;
  int r = r2 - r1;
  int rr = r2 + r1;
  double a = (p * p * rr * r * r )/ 4.0;
  return a;
}
int main(){
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  int c,x,y;cin >> c >> x >> y;
  double a = c * torus(x,y);
  printf("%.5f\n", a);
  return 0;
}
            
            
            
        
            
kaito_tateyama