if in a 20 over cricket match , there were no wide balls , no wides , no extras and no overthrows . what is the maximum number of runs that a batsman can score in an ideal case scenario ?
solution : 663 explanation : for an ideal case , the batsman will hit a six on each ball . but if he hits six on the last ball of the over , the strike will change in the next over . thus , the best he can do in the last ball is run 3 runs so that he retains the strike even in the next over . thus the total runs that he can score in each over : 6 * 5 + 3 = 33 but this will have to go like it only till the 19 th over . in the last over , he can hit a six in the last ball as well as that will be the last ball of the match . thus runs for the last over will be 6 * 6 = 36 . hence the maximum runs = 33 * 19 + 36 = 663 answer a
multiply(const_3, add(add(multiply(20, const_10), 20), const_1))