結果
問題 | No.2461 一点張り |
ユーザー |
👑 ![]() |
提出日時 | 2021-05-24 23:22:21 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 658 ms / 2,000 ms |
コード長 | 309 bytes |
コンパイル時間 | 222 ms |
コンパイル使用メモリ | 82,660 KB |
実行使用メモリ | 84,096 KB |
最終ジャッジ日時 | 2024-06-26 08:04:15 |
合計ジャッジ時間 | 5,125 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 7 |
ソースコード
from decimal import getcontext,Decimal import sys input=sys.stdin.readline write=sys.stdout.write getcontext().prec=30 T=int(input()) X=[0]*T for case in range(T): p,K=map(Decimal,input().split()) if p>0: X[case]=(1-pow(1-p,K))/p else: X[case]=K write("\n".join(map(str,X)))