結果

問題 No.58 イカサマなサイコロ
ユーザー fmhrfmhr
提出日時 2015-06-19 13:15:27
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 221 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 86,956 KB
実行使用メモリ 78,848 KB
最終ジャッジ日時 2023-09-21 09:45:31
合計ジャッジ時間 7,284 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 296 ms
78,556 KB
testcase_01 AC 872 ms
78,196 KB
testcase_02 AC 292 ms
78,172 KB
testcase_03 AC 230 ms
78,280 KB
testcase_04 AC 581 ms
78,848 KB
testcase_05 AC 635 ms
78,280 KB
testcase_06 WA -
testcase_07 AC 284 ms
78,120 KB
testcase_08 AC 437 ms
78,084 KB
testcase_09 AC 762 ms
78,448 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import random
N=int(input())
K=int(input())
w=0
c=755000
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