結果

問題 No.58 イカサマなサイコロ
ユーザー kutsutamakutsutama
提出日時 2018-03-25 01:22:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 377 bytes
コンパイル時間 177 ms
コンパイル使用メモリ 10,616 KB
実行使用メモリ 8,948 KB
最終ジャッジ日時 2023-09-07 10:16:28
合計ジャッジ時間 8,293 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1,239 ms
8,944 KB
testcase_02 AC 302 ms
8,748 KB
testcase_03 AC 181 ms
8,804 KB
testcase_04 AC 803 ms
8,736 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 300 ms
8,740 KB
testcase_08 AC 528 ms
8,852 KB
testcase_09 AC 1,111 ms
8,736 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import random

n = int(input())
k = int(input())

tes = 10**5
cnt = 0
for i in range(tes):
    taro = 0
    jiro = 0
    for j in range(n):
        if j < k:
            taro += random.randint(4, 6)
        else:
            taro += random.randint(1, 6)
        jiro += random.randint(1, 6)
    if taro > jiro:
        cnt += 1
res = cnt / tes

print(res)
0