Skip to content

xamroc/MultiplesOfANumber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

MultiplesOfANumber

CodeEval Challenge: Multiples of a Number

Challenge Description:

Given numbers x and n, where n is a power of 2, print out the smallest multiple of n which is greater than or equal to x. Do not use division or modulo operator.

Input sample:

The first argument will be a text file containing a comma separated list of two integers, one list per line. e.g.

13,8

17,16

Output sample:

Print to stdout, the smallest multiple of n which is greater than or equal to x, one per line. e.g.

16

32

About

CodeEval Challenge: Multiples of a Number

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages