結果
問題 | No.89 どんどんドーナツどーんといこう! |
ユーザー |
![]() |
提出日時 | 2017-08-16 14:46:23 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 552 bytes |
コンパイル時間 | 1,295 ms |
コンパイル使用メモリ | 164,552 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-05 23:16:33 |
合計ジャッジ時間 | 1,756 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;}