結果

問題 No.58 イカサマなサイコロ
ユーザー cielciel
提出日時 2015-06-19 23:28:01
言語 Ruby
(3.3.0)
結果
AC  
実行時間 3,038 ms / 5,000 ms
コード長 111 bytes
コンパイル時間 593 ms
コンパイル使用メモリ 11,352 KB
実行使用メモリ 15,460 KB
最終ジャッジ日時 2023-08-25 02:11:26
合計ジャッジ時間 18,119 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 726 ms
15,244 KB
testcase_01 AC 3,038 ms
15,440 KB
testcase_02 AC 748 ms
15,460 KB
testcase_03 AC 433 ms
15,400 KB
testcase_04 AC 1,905 ms
15,412 KB
testcase_05 AC 2,185 ms
15,252 KB
testcase_06 AC 2,763 ms
15,424 KB
testcase_07 AC 728 ms
15,424 KB
testcase_08 AC 1,276 ms
15,436 KB
testcase_09 AC 2,709 ms
15,220 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);a-=rand((i<K ? 4:1)..6)}
s+=1 if a<0}
p s/t
0