Skip to content

charlesncn/python-function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

python-function

Write a function:

def solution (N)

that, given an integer N, returns the smallest integer greater than N, the sum of whose digits is twice as big as the sum of digits of N.

Examples:

  1. Given N= 14, the function should return 19. The sum of digits of 19 (1+9=10) is twice as big as sum of digits of 14 (1+4= 5).

  2. Given N=10, the function should return 11.

  3. Given N = 99, the function should return 9999.

Assume that:

• N is an integer within the range [1..500].

In your solution, focus on correctness. The performance of your solution will not be the focus of the assessment.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages