結果

問題 No.567 コンプリート
ユーザー koba-e964koba-e964
提出日時 2017-09-08 22:46:43
言語 Ruby
(3.3.0)
結果
AC  
実行時間 85 ms / 2,000 ms
コード長 142 bytes
コンパイル時間 571 ms
コンパイル使用メモリ 11,288 KB
実行使用メモリ 15,648 KB
最終ジャッジ日時 2023-08-21 05:51:05
合計ジャッジ時間 2,846 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
15,516 KB
testcase_01 AC 79 ms
15,648 KB
testcase_02 AC 80 ms
15,520 KB
testcase_03 AC 80 ms
15,504 KB
testcase_04 AC 79 ms
15,536 KB
testcase_05 AC 80 ms
15,380 KB
testcase_06 AC 80 ms
15,500 KB
testcase_07 AC 79 ms
15,364 KB
testcase_08 AC 83 ms
15,372 KB
testcase_09 AC 80 ms
15,500 KB
testcase_10 AC 81 ms
15,376 KB
testcase_11 AC 80 ms
15,380 KB
testcase_12 AC 80 ms
15,512 KB
testcase_13 AC 80 ms
15,408 KB
testcase_14 AC 79 ms
15,368 KB
testcase_15 AC 80 ms
15,480 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_f
prob = 1 - 6 * (5.0/6) ** n + 15 * (4.0/6) ** n - 20 * (3.0/6) ** n +
       15 * (2.0 / 6) ** n - 6 * (1.0 / 6) ** n
puts prob
0