New answers tagged

0

Raku, 0 tie-breaker characters say ½−½−$_ given ½−½−get−get Try it online! − here is the Unicode character MINUS SIGN at codepoint 8722, rather than the ASCII/Unicode character -, HYPHEN-MINUS, at codepoint 45. The two are synonymous in Raku, but the former is by no stretch the "standard" subtraction operator. ½−½− is how I'm negating numbers ...


1

Python 3, 0 +/-, 3 Tie-breaker, (40 bytes) lambda x,y:len(f"{True<<x<<y:b}"[True:]) Try it online! Explanation : Truein python is evaluated as 1 => 1 shift x times then y times => 4 => 32 (for x=2 and y=3) convert it to its string binary representation => "100000" remove the first char of the string => "...


1

Python 2, 0 +/-, 2 tie-breaker (144 bytes) exec`["%c"%[ord(i)^True<<True<<True<<True][False]for i in"""xzaf| :""afx}| !":""afx}| !'':!&ja|Wdmfo|` !"""]`[True<<True::True<<True<<True|True] Try it online! How it works : The general idea is to remove tie-...


0

Python 3, 52 bytes print(*(w[0].upper()+w[1:]for w in input().split())) Try it online! print(*(w[0].upper()+w[1:]for w in input().split())) # full program print( ) # output... * # elements of... ( for in ) # generator ...


0

brainfuck, 11 bytes, 2 +-, 3 tie breaker ,>,[-<+>]<. Sadly i can’t think up anyway of manipulating number without +- Try it online!


2

Pip, 0 +/-, 0 tiebreakers (5 bytes) #JoXg Try it online! Explanation A string-concatenation approach: g List containing the command-line args oX For each arg, make a string of that many 1s (o is a variable preinitialized to 1) J Join the list into a single string # Get its length


3

Vyxal as, 0 bytes Try it Online! The a flag takes newline separated inputs as a list, and the s flag sums the top of the stack. Non-trivial a, 4 2 bytes -2 bytes because I realized the challenge guarantees 2 number input. ṁd Try it Online! Explanation: # 'a' flag - take newline separated inputs as a list ṁ # Mean of inputs d # Multiply by 2 # ...


0

MMIX, score 160 (STB) Without some means of memory manipulation, it can't be Turing complete. The lowest-numbered instruction that allows touching memory is STBU, at #A0. (Well, that's not entirely true, there's also CSWAP at #94, but that's useless without being able to touch rP, which requires PUT at #F6.) There's plenty of other stuff below, like branches ...


0

AAAAAAAAAAAAAA!!!!, Score: 65 (A). Characters are ! ,A. Proven as in this.


0

Pxem, W: 87. Characters are: !-.01ACDOVW (but ! can be any others, and O can be anything that works as pop one and discard it). Here's how to emulate cyclic tag system program (101,001,10) with input 1, for example, in Pxem (??.z ... .a is pseudo-comment; can be erased): ??.z # input is 1 # then loop begin .a!1.W??.z # exit if empty .a.C.C.-.W.D.A??.z ...


2

BRASCA, 1 byte Yep, it's another one of these. Pick any one of these: 0123456789oOnNlLeEdDhHK+-*^s}r&|_ABmM?!ST<>=Y Explanation TL;DR: Most instructions work because an empty stack consists of infinite zeroes. 0-9 - Pushes the digit, implicit output. oOnN - Prints the top/bottom of the stack, which is 0x00 because the stack is empty. ...


1

batch 63 23 bytes : T^ YP^ E==^ ;%~f0 Outputs the file content. Note: TIO not available, run it from the command line after turning echo off


3

Vyxal, 27 bytes »¬M*½ZW₌+ẋṗṄ⌈ȮȦ₀‛Ṡḋċ„₁≠λ»dd Try it Online! Unfortunately, the compressed form of the number contains a 2 and a 0. The compressed form of the number halved contains a 3. This is the compressed form of the number divided by 4, followed by two double commands: »¬M*½ZW₌+ẋṗṄ⌈ȮȦ₀‛Ṡḋċ„₁≠λ» # Push '...


0

BRASCA, 72 66 bytes `B:B:;A><>AC>?;<BA?BB@>?CC:>C@;A;:A?A::?A?>=@B:::::::::`![al-mA{]x Try it online! Explanation `B:B:;A><>AC>?;<BA?BB@>?CC:>C@;A;:A?A::?A?>=@B:::::::::` - Push the number, with the ASCII code shifted by 10 ![a mA{]x - ...


1

Haskell, 190 bytes 174 or 176 bytes160 or 162 bytes This challenge is not so easy in Haskell; there's practically no golfing here, aside from space removal. I imagine it's possible to do better. (!)#((&):(%))|(!)==(&)=0|0<1=(!)#(%) (&)(/)(*)(+)(!)@[(%)]|(/)(!),(!)>"Z"=(+)!!((%)#(*))|0<1=(%) (&)(<"a")['@'..]['`'....


0

Pxem, Numeric: 34 bytes + Non-numeric: 21 bytes = 55 bytes. Filename: Hello world!!!.pxxxxx1234567890123456789012345678901234 Content: empty The boring answer. The stupid latter part is nothing but a garbage. Try it online!


2

Factor, 12 bytes [ "y""8"v- ] Try it online!


1

Vyxal, 2 bytes «∧ Try it Online! Pushes 'a' as a compressed string, which is printed automatically.


0

Batch 100 bytes run from cmd.exe's command line using: echo(hexhundred|cmd /V:on filename: hexhundred.bat @Set /A s=0xa*0xa&@Echo(0 @For /l %%i in ()Do @If !a! LSS !s! @(Set/A a+=0xb-0xa&echo(!a!)Else Exit uses an infinite for /l loop and hex values to increment by 0xb-0xa [11-10=1] loop is broken when 0xa*0xa [10x10=100] is reached


0

K (oK), 4 bytes Solution: !"e" Try it online! Explanation: Scrolling through the other solutions tells me I wasn't as novel as I hoped when I came up with this. !"e" / the solution "e" / ASCII 101 ! / til (i.e. range 0..n-1


2

R, 127 bytes aA=`\143`("\101-\132","\141-\172") `\164`=1 `\143\141\164`(`\143\150\141\162\164\162`(aA[T+1],aA[t+1],`\163\143\141\156`(,""))) Try it online! This uses the octal code trick to write most of the code without letters. In its unaltered version, it is equivalent to aA=c("A-Z","a-z") t=1 cat(chartr(...


2

Vyxal, 9 lines, 25 bytes ` Hello , Wor l d !` \ - Try it Online! ` # Hello | , | Wor | Push 'Hello\n,\n Wor\nl\nd\n!' l | d | !` # \ # Push '\n' - # Remove all '\n' from 'Hello\n,\n Wor\nl\nd\n!' # Implicit output


1

Julia 1.0, 72 bytes Zz=0;Yy=z=Z=0;Xx->*((Cc->'`'<Cc+32Z<'{' ? Cc+32Z-32z : Cc).([Xx...])...) Try all 3 versions online!


3

Vyxal, 11 bytes uN‹ß⇧:[,]_⇩ Full Program: # Implicit input, e.g. "Hello, World!" uN‹ # Pushes '-1', negates it, and decrements, evaluating to `0` ß⇧ # Pops the top of the stack, and if it's truthy, converts the input to UPPERCASE. The top of the stack is '0', so this isn't executed :[,] # Duplicates the top ...


0

Hexagony, 3 bytes ߞ! Try it online! Or if you prefer code that terminates, here's 4 bytes: ߞ!@


1

CSASM v2.4.0.2, 83 bytes func main: push " " len print push "" len print push " " len print push " " len print ret end The only way to push numbers to the stack without using numbers is to create str instances and then get their lengths.


0

Deadfish~, 12 bytes iioddoioiiio Try it online! This, this is surprisingly short!


1

Vyxal, 8 bytes «:L∞I\«ǐ Try it Online! Explanation: «:L∞I\« # Base-256 compressed "john doe" ǐ # Convert To Title Case # Implicit output Vyxal doesn't support capital letters in compressed strings, which is why the ǐ command is needed.


2

Vyxal, 3 bytes kB∷ Try it Online! Explanation: kB # Built-in constant "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" ∷ # Second half of the string # Implicit output Alternate 3 byte solution kzṘ Try it Online! Explanation: kz # Built-in constant "zyxwvutsrqponmlkjihgfedcba" Ṙ # Reverse the string # Implicit ...


2

Factor + math.primes, sum 3373, 34 bytes readln string>number prime? pprint Try it online! Should be pretty self-explanatory I hope!


2

Vyxal, 1 byte, sum 23 æ Try it Online! æ is the built-in primality checker. Vyxal uses its own codepage, in which the character æ is 0x17, or 23, which is a prime number.


2

Excel, 34 bytes, sum 2039 =SUM(--(MOD(A2,SEQUENCE(A2))=0))=2 Uses SEQUENCE which was not available when the question was posted.


0

Branch, 11 bytes }}#/#}#^}}# Try it on the online Branch interpreter! Branch does have numbers in it. } is increment and { is decrement. # outputs as number. / goes to the left child, which is automatically initialized to 0, which is shorter than {{. Finally, ^ goes to the parent, which is 2 when that command is called. Actually, since the current node is 1,...


0

Actually, 35 characters (18 complete), ??? bytes The only interesting ones are: 6 3! 7 3!FD 8 3!F 9 3!FDFDDDD 0 1D - 4f$F The others are just "make some number with F and D and then change it to a char with c". = 3!FDFDDFDDDDDDDDDDDDDDDDDDDDDDDDDDDDc y 3!FDFDFDDDDDDDDDDDDDDDDDDDDDDDc u 3!FDFDFDDDDDDDDDDDDDDDDDDDDDDDDDDDc i 3!...


2

05AB1E, score 35, 162 149 bytes Uses the characters !12345<>RTxç. 6 3! 7 3!> 8 4x 9 T< 0 1< - 45ç = 15>Rç y 121ç u 115>>ç i 52x>ç o 111ç p 112ç [ 45x>ç ] 45>x>ç h 52xç j 53xç k 54x<ç l 54xç ; 31<x<ç ' Txx<ç \ 23xxç v 5!<<ç b 25x<xç n 55xç m 54x>ç ^ 24x<xç & Tx<xç * 42ç ( Txxç ) 41ç _ 24xx&...


0

Branch, 21 bytes 66.114.97.110.99.104. Try it on the online Branch interpreter! Not the most exciting answer. An answer with no numbers though: Branch, 74 bytes /^\^'/;c;^+/;c;^'/;c;^*N/;^*}}./;c;^+/;cn^-{{.O/;cn^-{./o{{{{.^}}./{{{{{{. Try it on the online Branch interpreter!


5

Cubically, all 35 characters in 166 bytes. (162 bytes possible; see third-to-last paragraph.) Cubically is by PPCG user MD XF. Each line is a Cubically program; omit the first two characters. Try it online! //accessible via 3x3x3 cube - @5 ' F@5 & FR@5 * R@5 ( DDR@5 ) DR@5 + FRF3@5 // F3 is valid Cubically for FFF, saving 1 byte " DRF@5 //...


0

asdf, 35 chars, 1420 bytes 6 asaasaaaasssasaaaasssasaasssasaaaasssasaa 7 asaasaaaasssasaaaasssasaasssasaaaaaa 8 asaasaaaasssasaaaaaasssasaaaaaa 9 asaasaaaasssasaaaaaasssasaaaasssasaa 0 asaasaaaasssasaaaasssasaaaaaaaa - asaasaaaasssasaasssasaasssasaaaasssasaasssasaa = asaasaaaasssasaaaaaaaasssasaasssasaa y asaasaasssasaaaaaaaasssasaaaasssasaa u ...


Top 50 recent answers are included