結果
| 問題 |
No.567 コンプリート
|
| コンテスト | |
| ユーザー |
Im_Gimlet
|
| 提出日時 | 2020-07-24 01:02:42 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 677 bytes |
| コンパイル時間 | 1,480 ms |
| コンパイル使用メモリ | 165,436 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-24 00:30:31 |
| 合計ジャッジ時間 | 2,099 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
using ll = long long;
using P = pair<ll, ll>;
const long double PI = acos(-1.0L);
ll GCD(ll a, ll b) { return b?GCD(b, a%b):a; }
ll LCM(ll a, ll b) { return a/GCD(a, b)*b; }
int main() {
int n; cin >> n;
long double ans = 0.0L;
ans = 6.0L*powl(5.0L/6.0L, n) - 15.0L*powl(4.0L/6.0L, n) + 20.0L*powl(3.0L/6.0L, n) - 15.0L*powl(2.0L/6.0L, n) + 6.0L*powl(1.0L/6.0L, n);
cout << setprecision(14) << 1.0L-ans << endl;
}
Im_Gimlet