結果

問題 No.58 イカサマなサイコロ
ユーザー pluto77pluto77
提出日時 2016-04-16 15:53:43
言語 Python2
(2.7.18)
結果
TLE  
実行時間 -
コード長 288 bytes
コンパイル時間 56 ms
コンパイル使用メモリ 6,940 KB
実行使用メモリ 14,108 KB
最終ジャッジ日時 2024-04-15 02:11:39
合計ジャッジ時間 15,885 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4,518 ms
7,168 KB
testcase_01 TLE -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
#yuki_58
import random

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

res=0
for i in xrange(1000000):
 temp=0
 for j in xrange(n):
  temp+=random.randrange(1,7)
  if j<k:
   temp-=random.randrange(4,7)
  else:
   temp-=random.randrange(1,7)
 res+=(temp<0)

print 1.0*res/1000000
0