結果
| 問題 | No.567 コンプリート |
| コンテスト | |
| ユーザー |
ngtkana
|
| 提出日時 | 2020-04-04 19:40:35 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 513 bytes |
| 記録 | |
| コンパイル時間 | 1,210 ms |
| コンパイル使用メモリ | 211,552 KB |
| 実行使用メモリ | 7,968 KB |
| 最終ジャッジ日時 | 2026-06-09 08:24:13 |
| 合計ジャッジ時間 | 2,380 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 12 |
ソースコード
#include<bits/stdc++.h>
#define ALL(v) std::begin(v),std::end(v)
using lint=long long;
using lubl=long double;
int main(){
std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false);
std::cout.setf(std::ios_base::fixed);std::cout.precision(15);
lint n;std::cin>>n;
lubl ans=0;
for(lint i=1;i<=6;i++){
lubl binom=1;
for(lint j=0;j<i;j++){
binom*=lubl(6-j)/(j+1);
}
ans+=((6-i)%2?-1:+1)*binom*std::pow(lubl(i)/6,n);
}
std::cout<<ans<<'\n';
}
ngtkana