Jakube
• Member for 7 years, 6 months
• Last seen this week

Pyth, 22 21 bytes &Qu?q%G2H& GH+yGHjQ2Z Try it online: Demonstration Really a tedious task in Pyth. Explanation: &Qu?q%G2H&\nGH+yGHjQ2Z implicit: Q = input number ...

Pyth, 19 bytes x.u@[tWNNhN00)CYz0Q Try it online: Demonstration or Test Suite Explanation: x.u@[tWNNhN00)CYz0Q implicit: z = input string, Q = input number .u z0 reduce z: for ...

Pyth, 31 29 27 25 bytes smhS.e?}b"04689"akd.n4zUz Try it online: Demonstration or Test Suite For each digit I compute the distances to each number. A distance is infinty, if the second digit is not ...

Pyth, 7 bytes .V0j^zb Alternative to @fry. This program reads a string and keeps on printing strings until infinity. Explanation: .V0 for b in (0 to infinity): ^zb compute all ...

Pyth, 16 bytes haDQsM*M*MTSlQ Try it online: Demonstration or Test Suite Explanation: haDQsM*M*MTSlQ implicit: Q = input number Q convert Q to a string l ...

Pyth, 21 bytes tl.us_<>_^N2/lz2lzsz Try it online: Demonstration or Test Suite edit: Found the edge case 1000, which didn't worked with my previous code. Fixed it for 1 byte. Explanation: ...

Pyth, 13 bytes .W>H9-/ZTyeZQ Try it online: Demonstration or Test Suite This will print all the alternative answers. Explanation: .W>H9-/ZTyeZQ Q read a number from input ....

Pyth, 34 bytes .A}Lrw1c2c." Wô-WûÄæ­§Òé } Try it online: Demonstration Explanation: ."... packed string, gets decoded to: "2 TO TOO TWO T0 B BE BEE B3" c split by ...

Pyth, 18 bytes /F.!M+lJ.njRTQ/LJT Try it online: Demonstration /F.!M+lJ.njRTQ/LJT implicit: Q = input number jRTQ convert each number in [0, ..., Q-1] to their digits .n ...

Pyth, 16 bytes -VF*VM.<VLQ_BMS2 Try it online: Demonstration Explanation: -VF*VM.<VLQ_BMS2 Q = input, pair of vectors [u, v] S2 creates the list [1, 2] _BM ...

Pyth, 7 bytes XRm0Q1Q Try it online: Demonstration Creating a matrix of zeros and replacing the diagonal elements with ones.

Pyth, 10 bytes /F.!MaQ-FQ Try it online: Demonstration Explanation: /F.!MaQ-FQ implicit: Q = input list -FQ reduce Q by subtraction aQ append the result to Q .!M ...

54 bytes Here are the intended solutions. Except for task 8 all solutions were found.

Pyth, 54 bytes @rR3c."ayÖÚ©*ÐPk<eüµÜxþ!¬Ì ¾½hÑðÙBwp"\c.d3 Try it online: Demonstration You can replace the last 3 chars .d3 with any year number to test the other Zodiac animals. Explanation: ...

Pyth, 7 bytes uxyGGQ1 Try it online: Demonstration Explanation: u Q1 apply the following statement input-times to G=1: xyGG update G with (2*G xor G)

Pyth, 51 bytes [qKUQ@VQKCIQ}]Km{@RdCBQKJ!-sQK&JqF.bsm@L@QdYN.p,sQK Try it online: Demonstration or Test Suite This prints a list of 5 boolean values. They indicate the properties in the order: ...

Pyth, 22 bytes JS*3QVQ@JN=J.i>JhN_<JN Try it online: Demonstration Simply performs the shuffling technique described in the OP. Explanation: JS*3QVQ@JN=J.i>JhN_<JN JS*3Q ...

Pyth, 26 + 1140850688 + (>4.37 × 1020201781) I have no idea if it is possible to calculate the exact length of the output for the third program. I can only give boundaries. It'll print something ...

Pyth, 25 bytes u&p?}HGH\x.-GH.n0<O017 Try it online: Demonstration or Test showing the random number Explanation: u&p?}HGH\x.-GH.n0<`O017 .n0 the ...

Pyth 86 bytes Apparently I've been nice this year... jd[z"has been"?qlzl{yPJsKxL+NG@Grz0"nice"+*"very "&!}Jm+*+2d*dd2SJhgs._M-VKtK0"naughty Try it online: Demonstration or Test Suite ...

Pyth, 27 * 0.8 = 21.6 VSQsm.[\ 4jkXj*dNQrT99rG1SQ Try it online: Demonstration Explanation: VSQsm.[\ 4jkXj*dNQrT99rG1SQ implicit: Q = input number VSQ for N in [1, 2, .....

Pyth, 68 bytes - 25% = 51 V.zI-hA.g}\:kcNdY=+YGjd+G@c"needs more data coal toys"b._-Fmsecd\:SH Try it online: Demonstration

Pyth, 15 bytes Ls*V+KyMb1+t_K1 This defines a function y. Try it online: Demonstration Explanation: Let y[n] be the n-th Motzkin Number. I calculate y[n] with the formula y[n] = dot product of (...

Pyth, 22 bytes pM_srSsfttTtMM.gkcz2 8 Try it online: Demonstration or Test Suite Explanation: pM_srSsfttTtMM.gkcz2 8 cz2 chop the input into pairs .gk ...

Pyth, 18 bytes jd[Kf!%QTs@Q2\x/QK Try it online: Demonstration or Test Suite Same idea as Martin's. Finds the first number >= floor(sqrt(n)), that divides n. Explanation: jd[Kf!%QTs@Q2\x/QK ...

Pyth, 33 bytes rjjezrXwJ"<>[] {}(),;"d7@c6JChz6 Try it online: Demonstration or Test Suite Explanation: J"<>[] {}(),;" assign this string to J rjjezrXwJd7@c6JChz6 implicit: z = ...

Pyth, 20 bytes *FPW}\)ztW}$$z}FvtPz Try it online: Demonstration or Test Suite Explanation: *FPW}$$ztW}\(z}FvtPz implicit: z = input string tPz remove the first and last ...

Pyth, 21 bytes sfg3=Z&}rT0"aeiou"hZz Try it online: Demonstration or Test Suite Explanation: I iterate through all chars and keep track of how many vowels I passed using a counter. Every time ...