結果
問題 |
No.567 コンプリート
|
ユーザー |
![]() |
提出日時 | 2020-04-04 19:40:35 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 513 bytes |
コンパイル時間 | 2,008 ms |
コンパイル使用メモリ | 191,932 KB |
最終ジャッジ日時 | 2025-01-09 14:07:36 |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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'; }