結果
問題 | No.2461 一点張り |
ユーザー |
![]() |
提出日時 | 2023-09-08 21:23:28 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 76 ms / 2,000 ms |
コード長 | 209 bytes |
コンパイル時間 | 211 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 76,556 KB |
最終ジャッジ日時 | 2024-06-26 14:12:23 |
合計ジャッジ時間 | 1,391 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 7 |
ソースコード
Q=int(input()) for _ in range(Q): result=0 p,K=map(float,input().split()) K=round(K) ans=1 w=0 for x in range(1,K): result+=x*(ans*p) w+=ans*p ans*=1-p result+=K*(1-w) print(result)