結果

問題 No.58 イカサマなサイコロ
ユーザー pluto77pluto77
提出日時 2017-07-19 09:54:48
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 1,897 ms / 5,000 ms
コード長 303 bytes
コンパイル時間 1,247 ms
コンパイル使用メモリ 76,992 KB
実行使用メモリ 94,872 KB
最終ジャッジ日時 2024-10-08 14:11:17
合計ジャッジ時間 15,528 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki_58
import random

n=int(raw_input())
k=int(raw_input())

res=0.0
r=3*10**6
for i in xrange(r):
 taro=jiro=0
 for i in xrange(n):
  jiro+=random.randint(1,6)
 for i in xrange(k):
  taro+=random.randint(4,6)
 for i in xrange(n-k):
  taro+=random.randint(1,6)
 if taro>jiro:
  res+=1
print 1.0*res/r
0