Geeksforgeeks

Error

×

Leaderboard

Showing:

Handle | Score |
---|---|

@Ibrahim Nash | 6424 |

@blackshadows | 6380 |

@mb1973 | 5704 |

@Quandray | 5245 |

@akhayrutdinov | 5111 |

@saiujwal13083 | 5046 |

@sanjay05 | 3762 |

@kirtidee18 | 3673 |

@mantu_singh | 3532 |

@marius_valentin_dragoi | 3523 |

@sushant_a | 3459 |

Complete Leaderboard | |

Handle | Score |

@cfwong8 | 1160 |

@gurshehzadsingh | 1052 |

@nithinreddy3210 | 801 |

@mohanreddy8847 | 702 |

@balwanyadav34 | 622 |

@satyamchhatrala | 616 |

@pritsahkar2000 | 614 |

@AkashLahoty | 606 |

@amangiri168 | 596 |

@iamchaitanyahegde | 589 |

@iib2019024 | 587 |

Complete Leaderboard |

Given three integers x, y, and z, the task is to find the sum of all the numbers formed by

having 4 at most x times, having 5 at most y times, and having 6 at most z times as a digit.

**Note: **Output the sum modulo 10^{9}+7.

**Example 1:**

Input: X = 1, Y = 1, Z = 1Output:3675Explanation: 4 + 5 + 6 + 45 + 54 + 56 + 65 + 46 + 64 + 456 + 465 + 546 + 564 + 645 + 654 = 3675

**Input: **X = 0, Y = 0, Z = 0
**Output: **0
**Explanation**: No number can be formed

**Your Task: **

You don't need to read input or print anything. Complete the function ** getSum() **which takes

0 ≤

Login to report an issue on this page.

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

YesLoading...

Number Formation

...