結果

問題 No.58 イカサマなサイコロ
ユーザー fmhrfmhr
提出日時 2015-06-19 13:26:39
言語 PyPy2
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 220 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 77,788 KB
実行使用メモリ 97,996 KB
最終ジャッジ日時 2023-09-21 09:45:46
合計ジャッジ時間 5,897 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 313 ms
97,880 KB
testcase_01 AC 661 ms
97,996 KB
testcase_02 AC 313 ms
97,652 KB
testcase_03 AC 243 ms
97,820 KB
testcase_04 AC 507 ms
97,836 KB
testcase_05 AC 552 ms
97,956 KB
testcase_06 AC 643 ms
97,996 KB
testcase_07 AC 316 ms
97,964 KB
testcase_08 WA -
testcase_09 AC 618 ms
97,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import random
N=int(input())
K=int(input())
w=0.
c=7**7
a=random.randrange
r=range
for i in r(c):
	t=0
	j=0
	for _ in r(N):
		j+=a(1,7)
	for _ in r(K):
		t+=a(4,7)
	for _ in r(N-K):
		t+=a(1,7)
	if t>j:
		w+=1
print(w/c)
0