| Bytes | Lang | Time | Link |
|---|---|---|---|
| 026 | Uiua | 240808T201454Z | nyxbird |
| 061 | JavaScript Node.js | 240808T005734Z | Andrew B |
| 095 | Befunge93 | 240422T085610Z | Adelie |
| nan | Tcl | 230410T120317Z | 138 Aspe |
| 038 | J | 230411T220555Z | south |
| 092 | Java JDK | 230411T170406Z | Fhuvi |
| 068 | Lua | 230410T213545Z | bluswimm |
| 063 | Arturo | 230225T073618Z | UrNightm |
| 046 | Julia 1.0 | 221102T110437Z | amelies |
| 050 | R + english | 221007T202617Z | acvill |
| 075 | C clang | 221005T111836Z | Noodle9 |
| 059 | Knight v2 | 221007T152835Z | Aiden Ch |
| 040 | Perl 5 | 221005T110121Z | Kjetil S |
| 097 | Oracle SQL | 221007T121930Z | René |
| 071 | Excel | 221006T203211Z | Engineer |
| 053 | Python 2 | 221006T233028Z | dingledo |
| 056 | PowerShell | 221006T152751Z | user3141 |
| 026 | Japt | 221005T163018Z | Kamil Dr |
| 040 | Jelly | 221006T145150Z | Baby_Boy |
| 018 | MathGolf | 221006T132310Z | Kevin Cr |
| 022 | Japt | 221006T120904Z | Shaggy |
| 064 | simply | 221006T011314Z | Ismael M |
| 145 | brainfuck | 221005T121223Z | Level Ri |
| 022 | Charcoal | 221005T085503Z | Neil |
| 059 | sed | 221005T084638Z | Jiří |
| 044 | Retina 0.8.2 | 221005T084610Z | Neil |
| 057 | JavaScript ES6 | 221005T074355Z | Arnauld |
| 023 | 05AB1E | 221005T082219Z | Kevin Cr |
| 054 | Ruby | 221005T055730Z | AZTECCO |
| 043 | Bash 5.2 | 221005T043841Z | GammaFun |
| nan | Wolfram Language Mathematica | 221005T024135Z | Jonah |
| 041 | x8664 machine code | 221005T034902Z | m90 |
| 029 | Pyth | 221005T031728Z | hakr14 |
| 058 | Python | 221005T030515Z | 97.100.9 |
| 068 | Python 3 | 221005T025127Z | naffetS |
| 039 | Factor + math.text.english | 221005T024112Z | chunes |
| 007 | Vyxal | 221005T022330Z | naffetS |
Uiua, 29 27 26 bytes
$"zo_te__o"⟜⟜▽10"ttffssen"
$"zo_te__o"⟜⟜▽10"ttffssen"
"ttffssen" # push "..."
▽10 # deciplicate each character
⟜⟜ # while pushing two copies of the original on top
$"zo_te__o" # insert into a formatted string
29 byte version:
⍥⊂5"zo","te":▽10."ttffssen"@o
JavaScript (Node.js), 63 61 bytes
_=>`zo${a='ttffssen'}te${a+a.replace(/./g,c=>c.repeat(10))}o`
Befunge-93, 95 bytes
etoz",,>"nessfftt",,,,v
>55+v>,^#p1+98"v"<,,,,<
|>:#<v>$9- >8+#<:8`
>"v:\_^#:<o",@
>0g,\1-^
Did some off-cam golfing; took me a while to get this down to <100 bytes, 'cuz my original was around 105 and looked more like a super glue gun.
Tcl, 301 57 bytes
saved bytes thanks to the comment of @Sisyphus
Golfed version provided by me, try it online!
puts zo[set x ttffssen]te$x[regsub -all . $x &&&&&&&&&&]o
Original ungolfed version
set a "ttffssen"
proc repeat_string {str count} {
set result ""
for {set i 0} {$i < $count} {incr i} {
append result $str
}
return $result
}
proc generate_string {a} {
set result ""
foreach char [split $a ""] {
append result [repeat_string $char 10]
}
return $result
}
puts "zo${a}te${a}[generate_string $a]o"
puts "zottffssentettffssenttttttttttttttttttttffffffffffffffffffffsssssssssssssssssssseeeeeeeeeennnnnnnnnno"
J, 38 bytes
echo'zo',(,'te','o',~[,10&#)'ttffssen'
Nothing new here...
echo'zo',(,'te','o',~[,10&#)'ttffssen'
'ttffssen' NB. str literal
( ) NB. monadic train
10&# NB. repeat each char 10 times
[, NB. append , to input [
'o',~ NB. appends 'o' to result using ~
'te', NB. append result to 'te'
, NB. append result to input
'zo', NB. append result to 'zo'
echo NB. print
Java (JDK), 92 bytes
Interesting challenge!
()->{var s="ottffssente";for(int i=0;i<90;)s+=++i==9?"":s.charAt(i<9?i:i/10%9);return"z"+s;}
I'm really glad that it was possible to beat the trivial solution :') (95 bytes) :
()->"zottffssentettffssen"+"t".repeat(20)+"f".repeat(20)+"s".repeat(20)+"eeeeeeeeeennnnnnnnnno"
Arturo, 110 65 63 bytes
- -45 bytes, -2 bytes thanks to Krenium
s:"ttffssen"print~{zo|s|te|s||join map split s=>[repeat&10]|o}
Readable version:
s: "ttffssen"
print ~{zo|s|te|s||join map split s => [repeat&10]|o}
R + english, 48 50
Edited per Dominic van Essen's comment
cat(substr(english::as.english(0:100),1,1),sep="")
Similar to chunes' answer, this solution uses a library / package to handle integer-to-English mapping, then parses and collapses the resulting vector.
C (clang), 106 \$\cdots\$ 77 75 bytes
f(i){for(i=0;i<101;i++)putchar("zottffssentettffssen"[i>99?:i<20?i:i/10]);}
Saved a whopping 22 28 30 bytes thanks to jdt!!!
Saved a byte thanks to ceilingcat!!!
Oracle SQL, 97 bytes
select 'z'||listagg(substr(to_char(to_date(level,'J'),'jsp'),1,1))from"DUAL"connect by level<=100
Or, a bit more readable:
select
'z' ||
listagg(
substr(
to_char(to_date(level, 'J'), 'jsp')
,1,1)
)
from
"DUAL"
connect by
level<=100;
Excel, 77 71 bytes
Saved 6 bytes thanks to JvdV
=LET(a,"ttffssen",CONCAT("zo",a&"te"&a,REPT(MID(a,ROW(1:8),1),10),"o"))
This is only slightly more efficient than just typing the 101 characters manually.
LET(a,"ttffssen"stores the stringttffssenfor later repeated use.CONCAT("zo",a&"te"&acombines strings to make the first part. This is only 2 bytes more efficient than hard-coding it.MID(a,ROW(1:8),1)turns the 8 character string into an array of 8 characters.REPT(MID(~),10)repeats each of those characters 10 times. These last two lines are the big byte-saver I missed the first time. Storing the string asais not efficient by itself but it is if you later re-use it in theREPT()function.CONCAT(~,~,~,"o")add the last letter to the rest of the bits.
Original 77 byte version:
="zottffssentettffssen"&CONCAT(REPT({"t","f","s","e","n"},5*{4,4,4,2,2}))&"o"
This 78 byte alternative looked like it'd be shorter since each character is repeated the same number of times (allowing you to replace an array with a single integer) but it's only a close second:
="zottffssentettffssen"&CONCAT(REPT({"t","f","s"},20))&"eeeeeeeeeennnnnnnnnno"
This 79 byte alternative was an attempt at compressing that array of characters but the savings where offset by the bytes required to convert them to strings:
="zottffssentettffssen"&CONCAT(REPT(CHAR(101+{15,1,14,0,9}),5*{4,4,4,2,2}))&"o"
Python 2, 53 bytes
Identical to my (and @xnor's, presumably) Python solution to the cross-post on Anarchy Golf.
s='ttffssen'
print'zo%ste'%s+s+(('o'+s*10)*8)[-8::-8]
PowerShell, 56 bytes
"zo$(($a='ttffssen'))te$a$(-join($a|% T*y|%{"$_"*10}))o"
"zo " # start s new string with "zo"
$( ) # evaluate the subexpression $(...), which ...
($a='ttffssen') # ... sets $a to "ttffssen", and outputs it straight back into the string (because of the additional brackets)
te # literal "te"
$a # insert $a ("ttffssen")
$( ) # insert the results of another subexpression $(...)
$a|% T*y # pipe $a to % (alias for ForEach-Object) and call the member ToCharArray()
|%{ } # pipe the single characters to % and process them in the scriptblock {...}; loop variable is $_
"$_"*10 # turn the char back into a string, and "multiply" it with 10
-join( ) # join those 10-char-long strings together
o # Add the final "one hundred"
Output is implicit.
Japt, 29 26 bytes
`zottffÑA`
+h`` +¢®pAÃ+'o
Note that there is an unprintable character between the `` on line 2
`zottffÑA` # U = "zottffssen"
# Start building the output with U implicitly
h`` # Replace the first 2 characters of U with "te"
+ # Add that to the output
¢ # Remove the first 2 characters of U
® Ã # For each remaining character
pA # Duplicate it 10 times
+ # Add that to the output
+'o # Add "o" to the output
# Print implicitly
I also tried another version which does "U repeated 10 times, grouped by index % 8, then joined" for the 20-99 portion, but it didn't golf as well
Jelly, 40 bytes
“¡Œb»
Ñ;¢x⁵
“¡Ph%»Ḥ
“¡çı»;¢1£“ŀu»¢1£2£”o
Basically just a couple of compressed strings, repeating some of them
MathGolf, 19 18 bytes
╢├╕◄ε╕f♣+∙╢►@♂m*'o
Explanation:
╢├ # Push compressed "zo"
╕◄ε # Push compressed "ttff"
╕f♣ # Push compressed "ssen"
+ # Append the top two together: "ttffssen"
∙ # Triplicate it
╢► # Push compressed "te"
@ # Triple-swap the top three values (a,b,c to c,a,b)
m # Map over the characters of the top "ttffssen":
♂ * # Repeat the character 10 times
'o '# Push character "o"
# (after which the entire stack is joined and output implicitly as result)
Japt, 22 bytes
`zo{=`ttffÑA`}{+mpA}o
`zo{=`ttffÑA`}\x92{+mpA}o
`zo o :Compressed string, starting with "zo" and ending with "o"
{ :Interpolate
= : Assign to variable U
`ttffÑA` : Compressed string "ttffssen"
} :End interpolation
\x92 :Compressed "te"
{ } :Interpolate
+ : Append to U
m : Map each character in U
p : Repeat
A : Ten times
simply, 64 bytes
Just uses the same method as plenty of answers.
out"zo"$A="ttffssen""te"$A;each$A as$v;for$_ in0..9out$v;out'o'
Outputs the expected string, without any trailing whitespace.
Ungolfed
Extremely verbose, almost looking like pseudo-code:
Set $initials to the value "ttffssen".
Show the values "zo", $initials, "te", $initials.
Loop through $initials as $letter.
Begin.
Loop from 0 to 9 as $i.
Begin.
Show the contents of $letter.
End.
End.
Show the value "o".
More code-y looking:
$initials = "ttffssen";
echo "zo", $initials, "te", $initials;
each $initials as $letter {
for $i in 0..9 {
echo $letter;
}
}
echo "o";
All versions do exactly the same.
brainfuck, 145 bytes
--[----->+>+>+>+>+>+>+>+<<<<<<<<]++++++++[->++>+>>>++>++>>+<<<<<<<<]>++++.>+.+++++..>.>.>---.>---.>-.>.<<+.->.[<]>------[.>]<[<]>[..........>]<+.
Commented code
--[----->+>+>+>+>+>+>+>+<<<<<<<<] Set cell 0 to 254 and loop 102 times filling cells 1 to 8 with ascii f
++++++++[->++>+>>>++>++>>+<<<<<<<<] Set cell 0 to 8 and loop 8 times boosting certain cells to give vnffvvfn
>++++. Move to cell 1; boost and output z
>+.+++++.. Move to cell 2; boost and output ott
>.>.>---.>---.>-.>. From cells 3 to 8 output ffssen modifying values as necessary
<<+.->. Move to cell 6; temporarily modify to output t; move to cell 7 to output e
[<]>------ Move to cell 1 and modify from z to t; cells now contain ttffssen
[.>] Move through ttffssen outputing each character once (12 to 19) until empty cell reached
<[<]> Move back to cell 1
[..........>] Move through ttffssen outputting each character 10 times (20 to 99)
<+. Move to cell 8; modify value to o and output
Charcoal, 22 bytes
≔ttffssenθzoθteθFθ×ιχo
Try it online! Link is to verbose version of code. Explanation:
≔ttffssenθ
Save the first letters of two/twelve/twenty, three/thirteen/thirty, four(teen)/forty, five/fifteen/fifty, six(teen/ty), seven(teen/ty), eight(een/y) and nine(teen/ty) in a variable.
zo
Output the first letters of zero and one.
θ
Output the first letters of two to nine.
te
Output the first letters of ten and eleven.
θ
Output the first letters of twelve to nineteen.
Fθ
Loop over the first letters of twenty to ninety.
×ιχ
Output each letter repeated ten times.
o
Output the first letter of one [hundred].
Retina 0.8.2, 44 bytes
zo_te_20$*t20$*f20$*s10$*e10$*no
_
ttffssen
Try it online! Link is to verbose version of code. Explanation: Mostly run-length compression via $*, with a final substitution to save a further 3 bytes.
JavaScript (ES6), 57 bytes
Builds the output recursively from right to left.
f=(k=8)=>k>0?f(k-.1)+`${s}o`[~~k]:`zo${s="ttffssen"}te`+s
Note
Because of floating point errors, we don't reach exactly k = 0 on the last iteration. That's why we have to use the test k > 0 ? instead of just k ?.
This is still 1 byte shorter than the following integer version:
58 bytes
f=(k=81)=>k--?f(k)+`${s}o`[k/10|0]:`zo${s="ttffssen"}te`+s
05AB1E, 23 bytes
.•p≠²δK•ÐST×JŠ"zoÿteÿÿo
Port of @97.100.97.109's Python answer, so make sure to upvote him/her as well!
Explanation:
.•p≠²δK• # Push compressed string "ttffssen"
Ð # Triplicate it
S # Convert the top copy to a list of characters
T× # Repeat each character 10 times as string
J # Join these back together to a single string
Š # Triple-swap so the other two strings are on top
"zoÿteÿÿo "# Push string "zoÿteÿÿo", where the `ÿ` are automatically filled with
# the three strings
# (after which the result is output implicitly)
See this 05AB1E tip of mine (section How to compress strings not part of the dictionary?) to understand why .•p≠²δK• is "ttffssen".
Bash 5.2, 45 43 bytes
-2 bytes thanks to Sisyphus
ttffssen
echo zo$_\te$_${_//?/&&&&&&&&&&}o
Uses the brand new (set-by-default) shell option patsub_replacement!
Look forward to seeing this in many a future Bash golf.
ATO is still on 5.1 at the time of writing, so if you want to try it out yourself, the easiest way is with alpine:edge:
#!/bin/sh
podman run --rm -i alpine:edge << 'EOF'
apk add bash >/dev/null
bash -c 'ttffssen;echo zo$_\te$_${_//?/&&&&&&&&&&}o'
EOF
Wolfram Language (Mathematica), 49 48 41 bytes
IntegerName@#~StringPart~1&~Array~100<>""
-1 thanks to Steffan
-7 thanks to att!
My Wolfram is rusty and was never great, so probably golfable, but it seemed like the right tool.
TIO shows an error because it can't connect to the internet, but it's still prints the correct answer.
x86-64 machine code, 41 bytes
66 B8 7A 6F 66 AB 48 B8 74 74 66 66 73 73 65 6E 48 AB AA C6 07 65 AE 48 AB 6A 0A 59 F3 AA 48 C1 E8 08 75 F5 B0 6F 66 AB C3
Following the standard calling convention for Unix-like systems (from the System V AMD64 ABI), this takes in RDI a memory address at which to place the result, as a null-terminated byte string.
In assembly:
f: mov ax, 'z' | 'o'<<8 # Put these two bytes in AX.
stosw # Write them to the string, advancing the pointer.
.byte 0x48, 0xB8 # Place the following eight bytes in RAX.
.ascii "ttffssen"
stosq # Write them to the string, advancing the pointer.
stosb # Write the first byte 't' again, advancing the pointer.
mov BYTE PTR [rdi], 'e' # Place the byte 'e' at the current output address.
scasb # Advance RDI over the 'e' while comparing with AL.
stosq # Write "ttffssen" again, advancing the pointer.
r: push 10; pop rcx # Set RCX to 10.
rep stosb # Write AL to the string 10 times, advancing the pointer.
shr rax, 8 # Shift RAX right by 8 bits; AL (its low byte)
# will be each of "ttffssen" in order.
jnz r # Jump back, to repeat, if the result is nonzero.
mov al, 'o' # Set AL to 'o'.
stosw # Write 'o' and a null byte, advancing the pointer.
ret # Return.
Pyth, 29 bytes
s["zo"J"ttffssen""te"Js*LTJ\o
A near literal translation of 97.100.97.109's Python solution.
Python 3, 68 bytes
print('zottffssentettffssen'+'t'*20+'f'*20+'s'*20+'e'*10+'n'*10+'o')
I'm sure this isn't optimal. Idk.
Vyxal, 7 bytes
₁ʀ∆ċvhṅ
₁ʀ∆ċvhṅ
₁ʀ # Range [0, 100]
∆ċ # Nth cardinal of each
vh # First char of each
ṅ # Join together
Vyxal sMH, 4 bytes
ƛ∆ċh
(thanks to lyxal)
sMH, why are there flags for everything
H flag # Preset stack to 100
ƛ # Map over 100
M flag # Make that 100 be a range [0, 100] instead of [1, 100]
∆ċ # Convert to cardinal
h # Get the first character
s flag # Join together