結果

問題 No.75 回数の期待値の問題
ユーザー titiatitia
提出日時 2022-01-02 01:48:46
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 199 bytes
コンパイル時間 389 ms
コンパイル使用メモリ 82,396 KB
実行使用メモリ 83,536 KB
最終ジャッジ日時 2024-04-19 04:50:06
合計ジャッジ時間 23,538 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 424 ms
76,320 KB
testcase_01 AC 446 ms
76,672 KB
testcase_02 AC 466 ms
76,544 KB
testcase_03 AC 648 ms
76,288 KB
testcase_04 AC 458 ms
76,416 KB
testcase_05 AC 436 ms
76,660 KB
testcase_06 AC 455 ms
76,160 KB
testcase_07 AC 711 ms
76,456 KB
testcase_08 AC 747 ms
76,416 KB
testcase_09 AC 717 ms
76,544 KB
testcase_10 AC 797 ms
76,544 KB
testcase_11 AC 798 ms
76,484 KB
testcase_12 AC 829 ms
76,032 KB
testcase_13 AC 952 ms
76,288 KB
testcase_14 AC 892 ms
76,544 KB
testcase_15 AC 1,181 ms
76,032 KB
testcase_16 AC 4,249 ms
76,596 KB
testcase_17 TLE -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import random

K=int(input())

ANS=0
for i in range(10**6):
    A=0
    S=0
    while S!=K:
        S+=random.randint(1,6)
        A+=1

        if S>K:
            S=0
    ANS+=A

print(ANS/(10**6))
0