結果

問題 No.58 イカサマなサイコロ
ユーザー cielciel
提出日時 2015-06-19 23:36:17
言語 Ruby
(3.3.0)
結果
AC  
実行時間 2,728 ms / 5,000 ms
コード長 108 bytes
コンパイル時間 153 ms
コンパイル使用メモリ 11,240 KB
実行使用メモリ 15,428 KB
最終ジャッジ日時 2023-08-25 01:35:20
合計ジャッジ時間 16,664 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 673 ms
15,264 KB
testcase_01 AC 2,728 ms
15,428 KB
testcase_02 AC 669 ms
15,248 KB
testcase_03 AC 399 ms
15,300 KB
testcase_04 AC 1,725 ms
15,396 KB
testcase_05 AC 2,035 ms
15,252 KB
testcase_06 AC 2,494 ms
15,152 KB
testcase_07 AC 655 ms
15,236 KB
testcase_08 AC 1,207 ms
15,320 KB
testcase_09 AC 2,523 ms
15,156 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