結果

問題 No.58 イカサマなサイコロ
ユーザー mlihua09mlihua09
提出日時 2020-09-14 23:08:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,550 ms / 5,000 ms
コード長 281 bytes
コンパイル時間 351 ms
コンパイル使用メモリ 87,144 KB
実行使用メモリ 81,064 KB
最終ジャッジ日時 2023-09-04 00:51:29
合計ジャッジ時間 12,902 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 797 ms
79,876 KB
testcase_01 AC 1,550 ms
79,776 KB
testcase_02 AC 736 ms
78,964 KB
testcase_03 AC 603 ms
79,288 KB
testcase_04 AC 1,211 ms
80,276 KB
testcase_05 AC 1,279 ms
79,992 KB
testcase_06 AC 1,547 ms
81,064 KB
testcase_07 AC 717 ms
78,812 KB
testcase_08 AC 1,073 ms
80,892 KB
testcase_09 AC 1,491 ms
79,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


import random
N = int(input())

K = int(input())

ans = 0

for i in range(10 ** 6):
    if sum([random.randrange(6) for j in range(N)]) < sum([random.randrange(6) for j in range(N - K)] + [random.randrange(3, 6) for j in range(K)]):
        ans += 1
        
print(ans / 10 ** 6)
0