結果

問題 No.2070 Icosahedron
ユーザー zawakasuzawakasu
提出日時 2022-09-16 21:22:46
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 695 bytes
コンパイル時間 2,053 ms
コンパイル使用メモリ 196,772 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-23 14:22:13
合計ジャッジ時間 2,651 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,384 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 2 ms
4,380 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