6 kyu
One line task: Square Every Digit
926 of 1,124Firefly2002
Description:
Inspired by Square Every Digit and by the inimitable myjinxin2015's many clever one-line katas
Your goal here is precisely the same: square every digit of the given integer, in as few characters as possible.
Your return value should be in integer format. Your input will always be a valid, non-negative integer, may be > 231
Code size limit: 36 characters or less
Examples
0 --> 0
64 --> 3616
1111 --> 1111
2222 --> 4444
3333 --> 9999
3212 --> 9414
1234 --> 14916
77455754 --> 4949162525492516
99999999 --> 8181818181818181
P.S., if you can get the sample tests to pass while under the character limit, the full tests should pass without a hitch!
Have fun, and please upvote if you enjoyed it :)
Found this one too easy? This one's a bit more difficult!
Too hard? This one's a bit easier :)
Puzzles
Games
Restricted
Refactoring
Similar Kata:
Stats:
Created | Apr 10, 2018 |
Published | Apr 10, 2018 |
Warriors Trained | 3453 |
Total Skips | 127 |
Total Code Submissions | 14341 |
Total Times Completed | 1124 |
JavaScript Completions | 926 |
Ruby Completions | 102 |
Python Completions | 135 |
Total Stars | 78 |
% of votes with a positive feedback rating | 92% of 276 |
Total "Very Satisfied" Votes | 238 |
Total "Somewhat Satisfied" Votes | 33 |
Total "Not Satisfied" Votes | 5 |
Total Rank Assessments | 4 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |