結果

問題 No.58 イカサマなサイコロ
ユーザー vwxyzvwxyz
提出日時 2021-09-23 21:09:48
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 304 bytes
コンパイル時間 443 ms
コンパイル使用メモリ 87,076 KB
実行使用メモリ 83,016 KB
最終ジャッジ日時 2023-09-18 19:58:18
合計ジャッジ時間 12,378 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2,613 ms
78,784 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**7):
    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**7
print(ans)
0