結果

問題 No.58 イカサマなサイコロ
ユーザー cielciel
提出日時 2015-06-19 23:32:07
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 104 bytes
コンパイル時間 517 ms
コンパイル使用メモリ 11,176 KB
実行使用メモリ 15,568 KB
最終ジャッジ日時 2023-09-21 10:15:53
合計ジャッジ時間 16,000 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 769 ms
15,156 KB
testcase_01 RE -
testcase_02 AC 772 ms
15,264 KB
testcase_03 AC 456 ms
15,260 KB
testcase_04 AC 2,002 ms
15,236 KB
testcase_05 AC 2,271 ms
15,416 KB
testcase_06 WA -
testcase_07 RE -
testcase_08 WA -
testcase_09 AC 2,910 ms
15,288 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(4-i/K*3..6)}
s+=1 if a<0}
p s/t
0