title: Probability: No of ways to win if you have n dice with m faces each
body: <p>You are given a number of dices n, each with a number of faces m. You roll all the n dices and note the sum of all the throws you get from rolling each dice. If you get a sum >= x, you win, otherwise you lose. Find the probability that you win.</p>
  
  <p>I thought of generating all combinations of 1 to m ( of size n ) and keeping count of only those whose sum is more then x . Total no of ways are m^n</p>
  
  <p>After that its just the divison of both.</p>
  
  <p>Is there a better way ?</p>