in how many ways can 5 different rings be worn in 4 particular fingers ? ( some fingers may get more than one ring and some may get no rings . ) can somebody explain ?
first ring can be worn in 4 ways ( on any of the four fingers ) ; second ring can be worn in 5 ways ( as it can go on any of four fingers - 4 ways ; plus it can go below the first one - 1 ) ; third ring can be worn in 6 ways ( the same logic as for the second ring ) ; fourth ring can be worn in 7 ways ; fifth ring can be worn in 8 ways ; total : 4 * 5 * 6 * 7 * 8 = 6720 . ans : a
multiply(multiply(multiply(multiply(4, 5), add(const_4, const_2)), add(add(const_4, const_2), const_1)), add(add(add(const_4, const_2), const_1), const_1))