結果

問題 No.57 ミリオンダイス
ユーザー rihitorihito
提出日時 2018-09-15 19:10:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 435 bytes
コンパイル時間 831 ms
コンパイル使用メモリ 10,608 KB
実行使用メモリ 7,940 KB
最終ジャッジ日時 2023-09-25 08:42:47
合計ジャッジ時間 1,390 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,876 KB
testcase_01 AC 15 ms
7,816 KB
testcase_02 AC 15 ms
7,940 KB
testcase_03 AC 15 ms
7,748 KB
testcase_04 AC 15 ms
7,832 KB
testcase_05 AC 15 ms
7,788 KB
testcase_06 AC 15 ms
7,836 KB
testcase_07 AC 15 ms
7,868 KB
testcase_08 AC 15 ms
7,832 KB
testcase_09 AC 15 ms
7,936 KB
testcase_10 AC 15 ms
7,824 KB
testcase_11 AC 17 ms
7,936 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# 1*1/6+2*1/6+3*1/6+4*1/6+5*1/6+6*1/6=3.5
# 2*(1/36)+3*(2/36)+4*(3/36)+5*(4/36)+6*(5/36)+7*(6/36)+8*(5/36)+9*(4/36)+10*(3/36)+11*(2/36)+12*(1/36)
# 3*(1/216) + 4*(3/216) + 5*(6/216) + ...
#と、考え出すと、ドツボにはまる。「和の期待値は期待値の和である」
# N個のサイコロのうち、1個のサイコロの期待値は3.5なので、N個のサイコロの和は3.5N

N = int(input())
print(3.5*N)

0