The trick is how to get the input parameters. If they're strings, then that's easy:
Take the final character of the first string, and convert to a number.
Take the final 2 characters of the second string, and convert to a number.
These numbers can be supplied instead of the original arguments.
But if the input is supposed to look like: (2^200)(2^300) then that turns into a parsing problem! We already know how to figure out the final digit for (2^300) (it's 6) and (2^200) (also 6), but how do we manage testing this?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Silly, illegible Clojure code. But it works.
The trick is how to get the input parameters. If they're strings, then that's easy:
But if the input is supposed to look like:
(2^200)
(2^300)
then that turns into a parsing problem! We already know how to figure out the final digit for(2^300)
(it's 6) and(2^200)
(also 6), but how do we manage testing this?