Print a bunch of uninteresting numbers!
An uninteresting number (which I totally didn't make up only for this challenge) is created like this:Take a positive integer NCreate a new number O by adding the digits of N at the end of NThe final...
View ArticleAnswer by R. Kap for Print a bunch of uninteresting numbers!
Python 2.7, 21 bytes:lambda f:int(`f`*2)*fWell, this has to be the shortest Python answer I have ever written in the shortest amount of time ever. It's an anonymous lambda function that can be executed...
View ArticleAnswer by Luis Mendo for Print a bunch of uninteresting numbers!
MATL, 6 bytestVthU*Try it online!tV % Input number implicitly. Duplicate and convert to stringth % Duplicate and concatenate the two equal stringsU % Convert to number* % Multiply
View ArticleAnswer by Katenkyo for Print a bunch of uninteresting numbers!
Lua, 20 BytesTakes in a command-line argument, and outputs via STDOUTa=...print((a..a)*a)And ungolfed as @LeakyNun asked in the comment :)a=... -- alias for the first argumentprint( (a..a) --...
View ArticleAnswer by Dom Hastings for Print a bunch of uninteresting numbers!
JavaScript (ES6), 10 bytes_=>(_+_)*_Needs to be called with the argument as a String, not a Number.Usage:(_=>(_+_)*_)('3')99-3 bytes thanks to @Quill's suggestion.
View ArticleAnswer by cliffroot for Print a bunch of uninteresting numbers!
Clojure, 22 bytes#(*(bigint(str % %))%)Anonymous function which concatenates string representation of its argument covnerts it to BigInteger and multiplies by the argument. The output is in format 11N...
View ArticleAnswer by Emigna for Print a bunch of uninteresting numbers!
05AB1E, 3 bytesЫ*ExplainedÐ # triplicate input« # conactenate * # multiplyTry it online
View ArticleAnswer by weston for Print a bunch of uninteresting numbers!
C#, 19 23 bytesn=>int.Parse(""+n+n)*n;Without strings, 47 bytesn=>{int i=1;while(i<=n)i*=10;return(i+1)*n*n;};
View ArticleAnswer by Luis Mendo for Print a bunch of uninteresting numbers!
CJam, 8 bytesri_`_+i*Try it online!r e# Read inputi e# Convert to integer_ e# Duplicate` e# Convert to string_ e# Duplicate+ e# Concatenatei e# Convert to integer* e# Multiply. Implicitly display
View ArticleAnswer by Doorknob for Print a bunch of uninteresting numbers!
zsh, 13 bytes<<<$[$1$1*$1]Takes input as a command line argument, outputs to STDOUT.This only works in zsh, but here's 15 bytes in Bash using echo instead of <<<:echo $[$1$1*$1]
View ArticleAnswer by user902383 for Print a bunch of uninteresting numbers!
Java 8, 29 26 25 21 BytesGod bless lambdac->new Long(c+""+c)*cc->Long.decode(c+""+c)*c;
View ArticleAnswer by busukxuan for Print a bunch of uninteresting numbers!
Pyth, 5 4 bytes*s+`Explanation: Q input ` representation, basically str(Q)+ Q add Q to its own string form s parse int* Q multiply by input printTest it here.
View ArticleAnswer by Adám for Print a bunch of uninteresting numbers!
Dyalog APL, 7 bytes⊢×#⍎⍕,⍕⍕ string representation⍕, prepend string representation#⍎ make into number (in root namespace)⊢× multiply by original number
View ArticleAnswer by Blue for Print a bunch of uninteresting numbers!
Pyke, 5 4 bytes`+b*Try it here!` - str(input)+ - ^+input (convert to string implicitly) b - int(^) * - ^*inputAlso 5 bytes with string inputs+bRb*+]mbB
View ArticleAnswer by Doorknob for Print a bunch of uninteresting numbers!
vim, 11C<C-r>=<C-r>"<C-r>"*<C-r>"<cr>crcrcrcrcr...C change (delete and enter insert mode) until the end of the line<C-r>= insert an expression via the special...
View ArticleAnswer by miles for Print a bunch of uninteresting numbers!
J, 7 bytes*,~&.":Explanation*,~&.": Input: n": Format n as a string ,~&. Reflect and join the string to make "nn" and parse the string to get a number* Multiply that number by n
View ArticleAnswer by Martin Ender for Print a bunch of uninteresting numbers!
Retina, 27 20 bytes^$_$*: $_:$_$*::Gets a bit slow for large inputs, because before the last the stage the result is represented in unary.Try it online! (The first line enables a linefeed-separated...
View ArticleAnswer by Brian for Print a bunch of uninteresting numbers!
SpecBAS - 30 bytes1 INPUT n$: ?VAL(n$+n$)*VAL n$My shortest SpecBAS answer yet :-)
View ArticleAnswer by Fatalize for Print a bunch of uninteresting numbers!
Brachylog, 7 bytes:?c:?*.Explanation:?c Concatenate Input to itself :?*. Output is that concatenation times Input
View ArticleAnswer by user48538 for Print a bunch of uninteresting numbers!
Jelly, 8 6 bytesŒṘẋ2v×Try it online!ExplanationŒṘẋ2v× - Main link. Left argument: the number to convert× - Multiply v - an evaluation of the left argumentŒṘ - converted to stringẋ - multiplied by 2 -...
View Article