結果
問題 | No.2461 一点張り |
ユーザー |
![]() |
提出日時 | 2023-09-18 07:33:51 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 287 bytes |
コンパイル時間 | 1,469 ms |
コンパイル使用メモリ | 165,648 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-04 23:41:05 |
合計ジャッジ時間 | 2,066 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 7 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; for(int _=0;_<t;_++){ double p; cin>>p; int k; cin>>k; double hazure = 1; double ans = 0; for(int i=0;i<k;i++){ ans += hazure*p*(i+1); hazure *= 1-p; } cout<<setprecision(10)<<ans<<endl; } }