Guest User

Guest User

  • Tech Writer
  • 31
  • 22.2k

someone please write c# code for the given logic

Dec 16 2016 11:06 AM
For the given number 'N'(0<N<=100), little johnny wants to find out the minimum positive integer 'X' divisible by 'N'. where the sum of digits of 'X' is equal to 'N' and 'X' is not equal to 'N'
If such 'X' does not exist, then output should be -1
 
Ex:
Input: 9
Output: 18
 
Input: 10
Output: 190 

Answers (1)