結果

問題 No.58 イカサマなサイコロ
ユーザー ytftytft
提出日時 2022-11-06 04:47:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 4,894 ms / 5,000 ms
コード長 367 bytes
コンパイル時間 376 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 79,176 KB
最終ジャッジ日時 2023-09-27 02:51:34
合計ジャッジ時間 54,948 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4,891 ms
78,560 KB
testcase_01 AC 4,891 ms
79,124 KB
testcase_02 AC 4,890 ms
78,476 KB
testcase_03 AC 4,893 ms
78,684 KB
testcase_04 AC 4,892 ms
78,812 KB
testcase_05 AC 4,894 ms
79,176 KB
testcase_06 AC 4,890 ms
78,644 KB
testcase_07 AC 4,891 ms
78,468 KB
testcase_08 AC 4,894 ms
78,876 KB
testcase_09 AC 4,893 ms
78,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys,time,random
input=lambda:sys.stdin.readline().rstrip()
N,K=[int(input()) for i in range(2)]
T=time.time()
trial,win=0,0
while time.time()-T<4.8:
	trial+=1
	taro,jiro=0,0
	for i in range(N):
		taro+=random.randrange(6)+1
	for i in range(N-K):
		jiro+=random.randrange(6)+1
	for i in range(K):
		jiro+=random.randrange(3)+4
	win+=(jiro>taro)
print(win/trial)
0