結果

問題 No.75 回数の期待値の問題
ユーザー 👑 rin204rin204
提出日時 2022-07-05 15:51:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,876 ms / 5,000 ms
コード長 270 bytes
コンパイル時間 380 ms
コンパイル使用メモリ 86,536 KB
実行使用メモリ 77,936 KB
最終ジャッジ日時 2023-08-22 04:24:48
合計ジャッジ時間 41,385 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,872 ms
77,820 KB
testcase_01 AC 1,874 ms
77,884 KB
testcase_02 AC 1,869 ms
77,936 KB
testcase_03 AC 1,871 ms
77,508 KB
testcase_04 AC 1,876 ms
77,652 KB
testcase_05 AC 1,871 ms
77,544 KB
testcase_06 AC 1,874 ms
77,772 KB
testcase_07 AC 1,871 ms
77,652 KB
testcase_08 AC 1,870 ms
77,392 KB
testcase_09 AC 1,871 ms
77,512 KB
testcase_10 AC 1,873 ms
77,348 KB
testcase_11 AC 1,872 ms
77,424 KB
testcase_12 AC 1,873 ms
77,624 KB
testcase_13 AC 1,871 ms
77,364 KB
testcase_14 AC 1,873 ms
77,496 KB
testcase_15 AC 1,873 ms
77,352 KB
testcase_16 AC 1,871 ms
77,408 KB
testcase_17 AC 1,870 ms
77,592 KB
testcase_18 AC 1,872 ms
77,492 KB
testcase_19 AC 1,871 ms
77,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import time
start = time.time()
import random

k = int(input())
cnt = 0
tot = 0
while time.time() - start < 1.8:
    x = 0
    cnt += 1
    while x != k:
        tot += 1
        x += random.randrange(1, 7)
        if x > k:
            x = 0
print(tot / cnt)
        

0