結果

問題 No.2070 Icosahedron
ユーザー zawakasuzawakasu
提出日時 2022-09-16 21:22:46
言語 C++17
(gcc 11.2.0 + boost 1.78.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 695 bytes
コンパイル時間 1,688 ms
使用メモリ 3,700 KB
最終ジャッジ日時 2023-01-11 05:51:15
合計ジャッジ時間 2,537 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 1 ms
3,700 KB
testcase_01 AC 2 ms
3,676 KB
testcase_02 AC 1 ms
3,656 KB
testcase_03 AC 1 ms
3,672 KB
testcase_04 AC 1 ms
3,584 KB
testcase_05 AC 1 ms
3,580 KB
testcase_06 AC 1 ms
3,620 KB
testcase_07 AC 1 ms
3,676 KB
testcase_08 AC 1 ms
3,696 KB
testcase_09 AC 1 ms
3,700 KB
testcase_10 AC 1 ms
3,680 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#define all(x) begin(x), end(x)

using namespace std;
using i32 = int;
using i64 = long long;
using ld = long double;

template <typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) {return a < b and (a = b, true);}

template <typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) {return a > b and (a = b, true);}

const i64 supl = LONG_LONG_MAX / 2 - 100;
const i32 supi = INT_MAX / 2 - 100;

void main_() {
    i32 n; cin >> n;
    ld ans = (ld)(15 + 5 * sqrt(5)) / 12.0 * (ld)n * n * n;
    cout << fixed << setprecision(12);
    cout << ans << endl;
}

int main() {
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);

    main_();

    return 0;
}
0