結果

問題 No.58 イカサマなサイコロ
ユーザー DrDrpilotDrDrpilot
提出日時 2022-02-10 13:19:19
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 299 bytes
コンパイル時間 161 ms
コンパイル使用メモリ 10,560 KB
実行使用メモリ 13,236 KB
最終ジャッジ日時 2023-09-08 02:27:16
合計ジャッジ時間 13,904 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3,301 ms
8,856 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):
    a,b=0,0
    for _ in range(n):
        a+=random.randint(1,6)
    for _ in range(n-k):
        b+=random.randint(1,6)
    for _ in range(k):
        b+=random.randint(4,6)
    if a<b:
        ans+=1
ans/=10**6
print(ans)  
0