結果

問題 No.58 イカサマなサイコロ
ユーザー vwxyzvwxyz
提出日時 2021-09-23 21:09:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 304 bytes
コンパイル時間 937 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 13,208 KB
最終ジャッジ日時 2023-09-18 19:58:04
合計ジャッジ時間 14,111 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3,424 ms
8,748 KB
testcase_01 TLE -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import random
N=int(input())
K=int(input())
ans=0
for _ in range(10**6):
    s0,s1=0,0
    for i in range(N):
        s0+=random.randint(1,6)
    for i in range(N-K):
        s1+=random.randint(1,6)
    for i in range(K):
        s1+=random.randint(4,6)
    if s0<s1:
        ans+=1
ans/=10**6
print(ans)
0