Write a program in JAVA that count the Total Runs made in one over(6 balls).
Answers
Answered by
1
619! /3719 = 9117*111818
Answered by
0
Answer:
Given three integers R, B and W which denote the number of runs, balls and wickets. One can score 0, 1, 2, 3, 4, 6 or a wicket in a single ball in a cricket match. The task is to count the number of ways in which a team can score exactly R runs in exactly B balls with at-most W wickets. Since the number of ways will be large, print the answer modulo 1000000007.
Examples:
Input: R = 4, B = 2, W = 2
Output: 7
The 7 ways are:
0, 4
4, 0
Wicket, 4
4, Wicket
1, 3
3, 1
2, 2
Input: R = 40, B = 10, W = 4
Output: 653263
Explanation:
Similar questions
English,
1 month ago
Computer Science,
1 month ago
Math,
4 months ago
India Languages,
4 months ago
Social Sciences,
10 months ago
English,
10 months ago