結果
問題 |
No.212 素数サイコロと合成数サイコロ (2)
|
ユーザー |
![]() |
提出日時 | 2020-04-30 21:08:02 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 278 bytes |
コンパイル時間 | 224 ms |
コンパイル使用メモリ | 82,156 KB |
実行使用メモリ | 136,352 KB |
最終ジャッジ日時 | 2024-12-17 17:18:56 |
合計ジャッジ時間 | 8,805 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 TLE * 1 |
ソースコード
import sys input=lambda: sys.stdin.readline().rstrip() p,c=map(int,input().split()) P=[2,3,5,7,11,13] C=[4,6,8,9,10,12] n=p+c N=6**n ans=0 for i in range(N): cur=1 for j in range(n): if j<p: cur*=P[i%6] else: cur*=C[i%6] i//=6 ans+=cur/N print(ans)