結果

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

テストケース

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

ソースコード

diff #

import random
N=int(input())
K=int(input())
ans=0
for _ in range(10**5):
    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**5
print(ans)
0