結果
| 問題 | No.89 どんどんドーナツどーんといこう! |
| コンテスト | |
| ユーザー |
kaito_tateyama
|
| 提出日時 | 2017-08-16 14:51:06 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 550 bytes |
| 記録 | |
| コンパイル時間 | 1,525 ms |
| コンパイル使用メモリ | 164,620 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-05 23:17:29 |
| 合計ジャッジ時間 | 2,275 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / 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 = (pow(p,2) * rr * pow(r,2))/ 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