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

Stats:

CreatedApr 10, 2018
PublishedApr 10, 2018
Warriors Trained3453
Total Skips127
Total Code Submissions14341
Total Times Completed1124
JavaScript Completions926
Ruby Completions102
Python Completions135
Total Stars78
% of votes with a positive feedback rating92% of 276
Total "Very Satisfied" Votes238
Total "Somewhat Satisfied" Votes33
Total "Not Satisfied" Votes5
Total Rank Assessments4
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • Firefly2002 Avatar
  • anter69 Avatar
  • kazk Avatar
  • JohanWiltink Avatar
  • Madjosz Avatar
  • Kacarott Avatar
Ad