結果
問題 | No.2070 Icosahedron |
ユーザー |
![]() |
提出日時 | 2022-09-16 21:22:46 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 695 bytes |
コンパイル時間 | 2,678 ms |
コンパイル使用メモリ | 191,976 KB |
最終ジャッジ日時 | 2025-02-07 06:02:27 |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
ソースコード
#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;}