+ 1
Challenges 1.0.0 "Congruent sets"
A congruent set is the set of all integers which have the same remainder for a particular modulo. example : [2]%3={2,5,8,...} read as: the congruent set of remainder [2] in mod 3 is {2,5,8,...} because 2%3==5%3==8%3... write a program that prints the congruent sets with common remainders [t-1], [t-2], up to [0] mod t, from [t-1] to m, [t-2] to m, up to [0] to m. where: t = modulo [t-n] = common remainder m = upper limit. good luck!! https://code.sololearn.com/c6JaV44hrPJt/?ref=app
3 Answers