about | help | code help+videos | done | prefs |
Rikken have various numbers of limbs and are usually found in pairs. Rikken a will only pair with rikken b when the sum of their limbs has the same number of digits as a. For a given rikken (a) and a potential pair (b), return the sum of their limbs if a will pair with b, otherwise just return a without b. (Note: one way to compute the number of digits of a non-negative int n is to convert it to a string with String.valueOf(n) and then check the length of the string.) rikken(2, 3) → 5 rikken(8, 3) → 8 rikken(8, 1) → 9 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 175
Copyright Nick Parlante 2017 - privacy