Search
JavaScript (V8), 44 bytes a=>a.map((a,x)=>a.map((n,y)=>n&&print(x,y))) Try it online!
APL (Dyalog Unicode), 21 bytes {×⍵-+/∪⍵∨¯1↓⍳⍵}¨∘⍳⊢⌸⍳ Try it online! Returns a matrix (padded with zeroes) where the first row is deficient numbers, the second is perfect numbers, and the thi...
Vyxal, 30 28 25 bytes Saved 1 4 bytes thanks to Aaron Miller ƛ∆K-±";£kɽƛ¥D„£_'t¥=;vṪ,£ Try it Online! A rather pitiful answer, but hey, it works. Gives deficient numbers, then perfect numbers...
Vyxal o, 16 bytes '∆K=;,'∆K<;,'∆K> Try it Online! Checks all numbers to see if they are perfect, then prints the ones that are, then does the same for abundant and deficient numbers. Ex...
Jelly, 1 byte Ḃ Try it online! Builtin. Returns 0 for even and 1 for odd
Japt, 1 byte u Japt, more like JABT (just another builtin) :P Try it
JavaScript (Node.js), 6 bytes n=>n%2 Try it online! Basically does what you'd expect.
Scala -language:postfixOps, 2 bytes 1& Try it online! 1 for odd, 0 for even. Scala, 3 bytes _%2 Try it online! 1 for odd, 0 for even.
Python 3, 98 bytes print(str(eval("("+input().replace(" ",")*(").replace("i","j")+")")).strip("()").replace("j","i")) Try it online! Since the input format is restrictive, I may as well just...
Python 3, 61 bytes lambda n,m:sum(randint(1,m)for i in[0]*n) from random import* Try it online! This is not an interesting answer as it is just a copy of your code. I tried to do it with ch...
Vyxal s, 5 bytes 2=A[5 Try it Online! You're not the only one who can abuse flags, Shaggy... 2= # Foreach, is it equal to to? A[ # If all are 2 5 # Push a 5. # (s flag) sum...
C (gcc), 35 32 bytes Saved 3 bytes thanks to Lundin f(n){n&&f(n/2);putchar(n&1|48);} This solution exploits that leading zeros, while not required, are also not forbidden by the ...
Since no one has posited anything yet... I think everything but the last three bullets can be kept. Other than that, we could add in the tips about challenge specifications. Challenges Posting...
jq, 14 bytes "Hello, \(.)!" Try it online! jq has expression interpolation, pretty epic!
Inspired by this Rosetta Code article. Introduction Balanced Ternary is a method of representing integers using -1, 0 and 1 in base 3. Decimal 11 = (1 * 32) + (1 * 31) + (−1 * 30) = [1,1,-1] or ...
This is a fixed output challenge. It is similar to a standard Kolmogorov complexity challenge, except you get to choose your own fixed output. Given no input, output 55 fruits. You may choose any 5...
Given a chess board with some knights on it, say how many squares are neither attacked by a knight nor containing a knight. Input An 8 by 8 grid where each square is either a knight or empty T...
Command-line arguments may be used as input instead of stdin Languages/systems that support reading input from command-line arguments may use those as input instead of reading from stdin.
JavaScript, 28 bytes f=n=>n-1&&-~f(n%2?n*3+1:n/2) Try it online!
The Ludic Numbers are a sequence that pops up when you apply the sieve of eratosthenes to the natural numbers, completely removing the numbers every iteration. Here is how they are generated: The...