結果
問題 | No.212 素数サイコロと合成数サイコロ (2) |
ユーザー |
|
提出日時 | 2016-11-22 17:37:37 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 10 ms / 5,000 ms |
コード長 | 515 bytes |
コンパイル時間 | 43 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2024-11-27 09:36:50 |
合計ジャッジ時間 | 626 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
P,C = map(int,raw_input().split(" ")) dice1 = [2,3,5,7,11,13] dice2 = [4,6,8,9,10,12] """ def calc(dice,n): def nyrn(i): if i==0: return [1] else: r = nyrn(i-1) ret = [] for rr in r: for d in dice: ret.append(rr * d/6.0) return ret return nyrn(n) """ ca = sum(dice1)**P / float(6**P) cb = sum(dice2)**C / float(6**C) """ ans = 0 for a in ca: for b in cb: ans += a*b """ print ca*cb