Open DNPotapov opened 1 year ago
This kata is definitely harder than the first one. See the last one here: http://www.codewars.com/kata/the-unknown-but-known-variables-addition
This one is a programming problem as well as a puzzle. And this is one of those annoying puzzles that is going to seem impossible, as the answer is not like a riddle, but something random some jerk over the internet came up with. But I have confidence you will solve it.
There will be a string input in this format: 'a*b'
2 lower-case letters (a-z) seperated by a '*'
Return the product of the two variables. The product will always be a positive integer or 0.
There is one correct answer for a pair of variables.
I know the answers, it is your task to find out.
Once you crack the code for a couple of the pairs, you should have the answer for the rest.
It is like when you were in school doing math and you saw "12 = c*b" and you needed to find out what c and b were.
However you don't have a 12. You have an UnKNOWN there as well. Example:
X = a*b.
You don't know what X is, and you don't know what b is or a, but it is a puzzle and you will find out.
As part of this puzzle, there is two hints or clues on solving this. I won't tell you what the other one is. But the first is: The key is in the title.
Given the input as a string - Return the product of the two variables as int.