Back
Close
  • 171

Learning Opportunities

This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills.

Statement

 Goal

You must output the smallest number greater than N with the same digit sum as N.
Input
An integer N.
Output
Required number.
Constraints
1 ≤ N ≤ 10^10
Example
Input
2
Output
11

A higher resolution is required to access the IDE