結果
| 問題 | No.2461 一点張り |
| コンテスト | |
| ユーザー |
mymelochan
|
| 提出日時 | 2023-09-08 21:27:42 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 50 ms / 2,000 ms |
| コード長 | 677 bytes |
| 記録 | |
| コンパイル時間 | 177 ms |
| コンパイル使用メモリ | 84,736 KB |
| 実行使用メモリ | 81,152 KB |
| 最終ジャッジ日時 | 2026-03-13 07:09:50 |
| 合計ジャッジ時間 | 984 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 7 |
ソースコード
#############################################################
import sys
sys.setrecursionlimit(10**7)
from heapq import heappop,heappush
from collections import deque,defaultdict,Counter
from bisect import bisect_left, bisect_right
from itertools import product,combinations,permutations
ipt = sys.stdin.readline
def iin():
return int(ipt())
def lmin():
return list(map(int,ipt().split()))
MOD = 998244353
#############################################################
for _ in range(iin()):
p,K = input().split()
p = float(p)
K = int(K)
t = 1
ans = 0
for i in range(1,K):
ans += t*p*i
t *= 1-p
ans += t*K
print(ans)
mymelochan