Company: Zomato
Difficulty: medium
Numbers Formation: Problem Description Given three Integers X, Y and Z, your task is to find the sum of all the numbers formed having 4 at most X times, 5 at most Y times, and 6 at most Z times. Output the sum modulo (10 9 + 7). Input The first line of input contains three integer x,y,z. Output Output the sum of all the numbers formed. Examples Example 1: Input: 1 1 1 Output: 3675 Explanation: For test case 1: 4 + 5 + 6 + 45 + 54 + 56 + 65 + 46 + 64 + 456 + 465 + 546 + 564 + 645 + 654 = 3675 Example 2: Input: 0 0 0 Output: 0 Constraints 1 ≤ x, y, z ≤ 60 Pseudo Code num[0][0][0] = 1; for (int i = 0; i <= x; ++i) { for (int j = 0; j <= y; ++j) { for (int k = 0; k <= z; ++k) { if (i > 0) { sum[i][j][k] += (sum[i - 1][j][k] * 10 + 4 * num[i - 1][j][k]) % mod; num[i][j][k] += num[i - 1][j][k] % mod; } if (j > 0) { sum[i][j][k] += (sum[i][j - 1][k] * 10 + 5 * num[i][j - 1][k]) % mod; num[i][j][k] += num[i][j - 1][k] % mod; } if (k > 0) { sum[i][j][k] += (sum[i][j][k -