It can be really uncomfortable to talk about your age when you get older. Sometimes you just want to be twenty again! Well, with some math magic that's totally possible - just select the correct number base. For example, if they are turning 32, that's 20 in base 16!
Translate the given age to the desired 20 or 21 years, and indicate the number base, in the format specified below.
Note: input will be always > 21
Examples:
32 --> "20, in base 16"
39 --> "21, in base 19"
Tests:
a, b; where a is the age of the person, b is the desired age.
50, 20
50, 21
43, 20
66, 21
This challenge comes from anter69 on CodeWars. Thank you to CodeWars, who has licensed redistribution of this challenge under the 2-Clause BSD License!
Want to propose a challenge idea for a future post? Email yo+challenge@dev.to with your suggestions!