Search
Use the unpacking * instead of list If you want to convert an iterator/generator into a list, use the * operator instead of using the list function, e.g. Instead of list(iterable) Use [*iter...
Haskell, 13 bytes 2!2=5 x!y=x+y Try it online!
I think "Dangerous" could perhaps stay on. "Outdated" would probably be better off replaced with "Invalid" or something of that sort. I don't think we need "Works for me" or an analog of it at all:...
Given a sequence of letters, output only the vowels. Input A sequence of letters This may be a string or any ordered data structure of characters (provided it is consistent between inputs) Th...
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...
The problem Someone has created an encoding format for square bit matrices, however they have found it isn't perfect! One encoding may not decode to exactly one matrix, or it may not even be possi...
Task Given a list of numbers $X$ produce a second list of numbers $Y$ such that $Y_i$ is the length of the longest common prefix of $X$ and $X$ with the first $i$ elements removed. For example if...
Given a string, convert all of its letters using ROT13, and all of its digits using ROT5. This is sometimes referred to as ROT13.5. Input A sequence of printable ASCII characters (character cod...
The probability of rolling every number from 1 to 6 with $N$ six-sided dice. Input A positive integer $N$. Your code must work for inputs up to and including 10, but may crash, error, or give ...
Python, 88 bytes import abc,code,fcntl,graphlib,json,pickle,cmd,errno,heapq,re,struct,csv,pwd,xml,sys,bz2 Attempt This Online! Requires a Unix-like operating system for fcntl and pwd, and at l...
The challenge is to write as short a source as possible, where the English alphabet (in alphabetical order from top to bottom) "abcdefghijklmnopqrstuvwxyz" is a sub-sequence of the source code. Th...
Python 3.8+, 51 byte lambda n:((i:="IVXLCDM".index(n))%2*4+1)*10**(i//2) Testing the code: f=lambda n:((i:="IVXLCDM".index(n))%2*4+1)*10**(i//2) for s in "IVXLCDM": print(s, f(s)) T...
HTML, 16 bytes <body bgcolor=0> an attribute that works well for this challenge. tested on Mozilla Firefox. -3 from [Object object]
Given a list of non-negative integers the function $f$ replaces every integer with the number of identical integers preceding it (not necessarily contiguously). So f [1,1,2,2,1,3,3] = [1,2,1,2,3,1...
The Challenge Your job is to, given input positive non-zero integer $n$, output an ASCII representation of the tiled Fibonacci squares up to the $n$th number of the Fibonacci sequence. Rules Inp...
Jelly, 13 bytes 50R>×ɗị⁾-|Ø[j Try it online! Full program only--insofar as supporting the input requirements is concerned. Jelly implicitly Python evals the arguments to every program, so s...
Vyxal 3, 26 bytes ÷50×.5+:'|×'[p$51$-'-×']W“ Vyxal It Online! ÷50×.5+:'|×'[p$51$-'-×']W“...
Uiua, 19 bytes $"[_]"⊏⊙"-|">÷⟜⇡50÷ pad $"[_]"⊏⊙"-|">÷⟜⇡50÷...
Japt, 18 bytes "[{/V*50 ç| ú-50}] Try it
Lean is an interactive theorem prover and a functional programming language created in 2013. What tips do you have for golfing in Lean? Tips should be specific to Lean ("remove comments" is not an...
You work at a beach. In the afternoon, the sun gets quite hot and beachgoers want to be shaded. So you put out umbrellas. When you put out umbrellas you want to shade the entire beach, with as few ...
Your mission for today, should you choose to accept it, is to write a simple 12-hour clock calculator. Your input will always be in the form of arg op arg, where op is either + or -, and arg is eit...
This is a language specific challenge, for HTML only. Your answer is the content of a self contained HTML file, that when opened in a web browser gives a plain black page. Requirements The HTM...