結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 85 ms
76,360 KB
testcase_13 AC 87 ms
76,296 KB
testcase_14 AC 84 ms
76,504 KB
testcase_15 AC 85 ms
76,420 KB
testcase_16 AC 194 ms
76,396 KB
testcase_17 AC 194 ms
76,448 KB
testcase_18 AC 193 ms
76,544 KB
testcase_19 AC 190 ms
76,420 KB
testcase_20 AC 187 ms
76,436 KB
testcase_21 AC 190 ms
76,580 KB
testcase_22 AC 193 ms
76,536 KB
testcase_23 AC 190 ms
76,544 KB
testcase_24 AC 189 ms
76,380 KB
testcase_25 AC 185 ms
76,576 KB
testcase_26 AC 189 ms
76,464 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

a = 0
conj = 1 / p

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