結果

問題 No.58 イカサマなサイコロ
ユーザー dangodango
提出日時 2023-07-09 20:41:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,035 ms / 5,000 ms
コード長 203 bytes
コンパイル時間 300 ms
コンパイル使用メモリ 86,872 KB
実行使用メモリ 78,792 KB
最終ジャッジ日時 2023-10-01 00:36:49
合計ジャッジ時間 7,805 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 340 ms
78,472 KB
testcase_01 AC 1,035 ms
78,752 KB
testcase_02 AC 326 ms
78,308 KB
testcase_03 AC 239 ms
78,144 KB
testcase_04 AC 706 ms
78,632 KB
testcase_05 AC 790 ms
78,792 KB
testcase_06 AC 977 ms
78,520 KB
testcase_07 AC 331 ms
78,156 KB
testcase_08 AC 534 ms
78,560 KB
testcase_09 AC 957 ms
78,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import random
N = int(input())
K = int(input())
S = 0
T = 7 ** 7
for _ in range(T):
	A = 0
	for i in range(N): A += random.randrange(1,7) - random.randrange(4 if i < K else 1, 7)
	S += A < 0
print(S / T)
0