結果

問題 No.1305 Speak of the Devil
ユーザー wdpuyowdpuyo
提出日時 2020-12-03 10:18:18
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 164 bytes
コンパイル時間 320 ms
コンパイル使用メモリ 87,196 KB
実行使用メモリ 71,724 KB
最終ジャッジ日時 2023-10-11 19:09:19
合計ジャッジ時間 3,817 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 74 ms
71,376 KB
testcase_13 AC 76 ms
71,540 KB
testcase_14 AC 74 ms
71,520 KB
testcase_15 AC 75 ms
71,588 KB
testcase_16 AC 73 ms
71,544 KB
testcase_17 AC 73 ms
71,368 KB
testcase_18 AC 74 ms
71,364 KB
testcase_19 AC 76 ms
71,364 KB
testcase_20 AC 74 ms
71,388 KB
testcase_21 AC 73 ms
71,420 KB
testcase_22 AC 73 ms
71,616 KB
testcase_23 AC 74 ms
71,496 KB
testcase_24 AC 75 ms
71,144 KB
testcase_25 AC 73 ms
71,372 KB
testcase_26 AC 75 ms
71,596 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

p, q = list(map(int, input().split()))

a = 0
conj = 1 / p

for i in range(1, 1000):
    a += i * conj
    conj *= (p - 1) / p
    i += 1
    
print(min(a, q))
    
0