結果

問題 No.58 イカサマなサイコロ
ユーザー cielciel
提出日時 2015-06-19 23:34:19
言語 Ruby
(3.3.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 108 bytes
コンパイル時間 65 ms
コンパイル使用メモリ 11,344 KB
実行使用メモリ 15,468 KB
最終ジャッジ日時 2023-09-21 10:17:55
合計ジャッジ時間 18,051 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 745 ms
15,468 KB
testcase_01 AC 3,005 ms
15,268 KB
testcase_02 AC 733 ms
15,312 KB
testcase_03 AC 440 ms
15,432 KB
testcase_04 AC 1,908 ms
15,204 KB
testcase_05 AC 2,169 ms
15,272 KB
testcase_06 AC 2,794 ms
15,412 KB
testcase_07 AC 728 ms
15,384 KB
testcase_08 WA -
testcase_09 AC 2,758 ms
15,344 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N,K=$<.map &:to_i
s=0.0
(t=9**6).times{a=0
N.times{|i|a+=rand(1..6)-rand((i<K ? 4:1)..6)}
s+=1 if a<0}
p s/t
0