1, 2, miss a few, 99, 100

When I was a kid, there was a "really cool" shortcut to count to 100:

1, 2, miss a few, 99, 100

Output the exact string above, in the fewest characters possible, without using these characters: 0, 1, 2, 9

• When you say 0, 1, 2, 9, do you mean source is only restricted to not contain ASCII/codepages 48, 49, 50 and 57? – 640KB Feb 22 at 15:22
• This is a nice challenge, but be aware that Do X without Y is discouraged because it's often very similar to other challenges with the same premise – Redwolf Programs Feb 22 at 16:25
• This does belong on this site, and is on-topic. Redwolf was simply pointing out that Do X without Y often leads to low-quality challenges or duplicates, so it isn't always the best "approach" to have when thinking of a challenge – caird coinheringaahing Feb 22 at 17:21
• Is x=>'１，　２，　ｍｉｓｓ　ａ　ｆｅｗ，　９９，　１００'.normalize('NFKC') a valid submission as it using not 1? – tsh Feb 23 at 2:29
• Anyone else grow up with "skip a few"? – MooseBoys Feb 23 at 18:13

JavaScript (ES6), 43 bytes

Browser only.

_=>atobMSwgMiwgbWlzcyBhIGZldywgOTksIDEwMA

Try it online! (with a polyfill)

JavaScript (ES6), 45 bytes

_=>[4-3,5-3,'miss a few',33*3,5*5*4].join,

Try it online!

• I tried to see if I could come up with some thing shorter, but I'm out by quite a lot (and not got splice working as I'd hoped), but I wonder if you could do anything with _=>[..."45x67"].map((c,i)=>i>=3?+(6+c)+33:c-3) – Pureferret Feb 24 at 20:58
• @Pureferret Still far too long, but here is a shorter one. – Arnauld Feb 24 at 21:54
• wow that's neat, thanks. Another idea was to use charPointAt on the string 'miss a few' or use pi for strings, but again too long. – Pureferret Feb 24 at 23:22

Bash + coreutils, 40

tr 3-? /-:<<<"5, 6, miss a few, ==, 544"

Try it online!

• I really like this. – Jonah Feb 22 at 19:37
• Looks like wildcard expansion on '?': what's the environmental constraint? – Joshua Feb 23 at 2:05
• @Will: And if I have a file called 3-1? – Joshua Feb 23 at 3:59
• @Joshua, there is an Assumptions about the working directory answer in the What assumptions about the file system layout can be made? meta discussion, saying “The present working directory may be assumed to be empty.” So we ignore the possible presence of such files. – manatwork Feb 23 at 4:07
• @Joshua I guess 3-@ would work with the same byte count and no filesystem assumptions. – Sisyphus Feb 23 at 5:47

R, 43 41 bytes

cat(T+F:T,"miss a few",3*33+F:T,sep=", ")

Try it online!

T and F are equal to TRUE and FALSE. They get coerced to integers 1 and 0 by the operators + and :.

• You can save another 2 bytes by writing 99:100 as 66:67+33 – Kirill L. Feb 22 at 18:46
• @KirillL. Thanks! I was editing in something similar as you commented. – Robin Ryder Feb 22 at 18:47

Jelly, 23 bytes

3Ṗ,³ṭ’¤j“¤mɗʂɠẉ⁾»W¤j⁾,

Try it online!

How it works

One thing to note: Jelly has the atom, which prints a string Jelly representation of it's argument. Lists in Jelly do not use [ and ] as open/close markers, instead they consist of comma-separated values:

1,2,3,4,5Ṙ

prints 1,2,3,4,5, unfortunately, without spaces.

3Ṗ,³ṭ’¤j“¤mɗʂɠẉ⁾»W¤j⁾,  - Main link. Takes no arguments
3                       - Yield 3;
Ṗ                      - Pop from 3, yielding [1, 2]
³                    -   100
’                  -   Decrement; 99
ṭ                   -   Tack; [99, 100]
,                     - Pair; [[1, 2], [99, 100]]
“¤mɗʂɠẉ⁾»       -   The compressed string "miss a few"
W      -   Wrap; ["miss a few"]
j                - Join; [1, 2, ["miss a few"], 99, 100]
j⁾,  - Join with ", "; "1, 2, miss a few, 99, 100"

HTML + CSS, 118 bytes

<c>, <c>, miss a few, <d><d><c>, <c><style>c:before{content:counter(a);counter-increment:a}d{counter-increment:a 48}

• &#57 and &#48 may works for 9 and 0. But I'm not getting a shorter solution with these escape sequence. – tsh Feb 23 at 3:27

Python 3, 54, 51, 47 42 bytes

Saved 2 bytes thanks to Digial Trauma's suggestion to replace 8*8+35 = 99 with 33*3 = 99.

Saved 1 byte by realizing that I could replace 8*8+36 = 100 with 4*5*5 = 100.

Saved 4 bytes thanks to dingledooper's suggestion to use sep=', ' in the print!

Saved 5 bytes thanks to ovs' suggestion to use bytes objects.

print(*b"","miss a few",*b"cd",sep=", ")
The b"" is equivalent to b"\1\2".

Try it online!

print(f"{4-3}, {6-4}, miss a few, {33*3}, {4*5*5}")

Try it online!

• You can replace 8*8+35 with 3*33. – Digital Trauma Feb 22 at 17:51
• Thanks, didn't catch that. – qwatry Feb 22 at 18:18
• Use print separators for 47 bytes – dingledooper Feb 22 at 23:53
• You can save a few more bytes with *b"\1\2" and *b"cd": Try it online! – ovs Feb 23 at 12:05
• Didn't realize byte objects could be used that way. That's an odd feature. Just messing around with this I realized that you need the unpacking operator, *, to force it to print as an int even if there is only one character in the byte object. – qwatry Feb 23 at 14:43

Whispers v3, 124..120 114 bytes

>> Each 5 57
>> Then 7 3 6 3 4 3 54 3 8
> ", "
> "miss a few"
>> "L"
>> #3
>> #5
>> 53*6
>> #4
>> 8-7
>> Output 56

Try it online!

Explanation:

I use the fact that each line with the line number $$\x\$$ can be called with $$\x + k \cdot n \$$, where $$\k \in \mathbb{N} \$$ and $$\n\$$ is total number of lines of code. Example from code with 11 lines: the reference to line 1 can be replaced by 12, 23, 34, and so on.

Try the translated version online!

Line by line:

As always in Whispers, we run the last line first:

>> Output 56

This line outputs the result from line 56. Since the code does not have 56 lines it actually outputs line $$\ 56 \mod 11 = 1\$$:

>> Each 5 57

Applying the same trick again we can replace this line with:

>> Each 5 2

In line 5 we can expect a function and in line 2 an array. The function will be applied on each element of the array and it replaces the element with the result. Let us first look at line 5:

>> "L"

L is an argument from the Each statement in line 1. L is converted to a string.

Now line 2:

>> Then 7 3 6 3 4 3 54 3 8

Then creates an array with the arguments as its elements. If we would print this line we get the following array:

[1, ', ', 2, ', ', 'miss a few', ', ', 99, ', ', 100]

Explanation of the arguments:

Line 3 and 4: simple strings

Line 6: Returns the length of line 3, so we get 2

Line 7: Returns the length of line 5, so we get a 1

Line 8: Returns the result of line 53 (actually 9) raised to the power of the result of line 6, so we get 100

Line 54 (actually 10): Subtracts result of line 8 with the result of line 7, so we get a 99

PHP, 5756 53 bytes

printf('%c, %d, miss a few, %d, %o',7*7,5-3,33*3,64);

Try it online!

A printf, some spices, stir

EDIT: -1 byte thanks to Digital Trauma

EDIT 2: -3 bytes thanks to Michael Dorgan for octal, thought about 153 with %x for hex but it has a 1..

Also, less fun but 2 bytes shorter by manatwork, improved by BadHorsie (it seems that <?= can also take multiple arguments with comas):

PHP, 51 49 bytes

<?=5-4,', ',5-3,', miss a few, ',33*3,', ',5*5*4;

Try it online!

• 5-3 (with %d) is 1 shorter than 47+3 (with %c). – Digital Trauma Feb 22 at 17:49
• @DigitalTrauma good catch! – Kaddath Feb 22 at 17:53
• An echo with simply enumerated parameters would be shorter. Try it online! – manatwork Feb 23 at 0:57
• From my answer, think "octal" for the 100 (64) :) – Michael Dorgan Feb 23 at 1:20
• Use <?= instead of echo to save a couple of bytes. – BadHorsie Feb 23 at 12:09

$><<[3/3,6/3,'miss a few',33*3,5*5*4]*", " Try it online! -4 from Jonah. Borrows from Arnauld's answer. Ruby, 46 44 bytes$><<"cd".bytes.insert(2,"miss a few")*", "

Try it online!

The three unprintables for codepoints 1, 2 and 3 are in the string containing "cd".

-2 from manatwork. Other version with same bytecount

• 42 bytes. 99 / 100 trick thanks to Arnauld. – Jonah Feb 22 at 19:17
• For replacing a single “3” .sub() is enough, no need for its global brother. – manatwork Feb 23 at 0:44
• BTW, without regular expression would be 1 more character shorter, though still longer than Jonah's. Try it online! or Try it online! – manatwork Feb 23 at 0:51
• Thanks for your help! @Jonah manatwork – Razetime Feb 23 at 3:28

C (gcc), 54 56 bytes

l(){printf("%c, %d, miss a few %d, %o",7*7,5-3,'c',64);}

Try it online!

Let's save a couple bytes using Octal for the 100. Thanks to Sheik Yerbouti for saving a byte and point out the no commas issue.

• Using C, I looked at a putchar() alternative, but it isn't all that short, unfortunately: for(char x[]="4/#5/#plvv#d#ihz/#<</#433",*y=x;*y;)putchar(*y++-3); – Will Feb 23 at 4:21
• I tried really hard to loop, but it just gets too big. Hence using printf qualifiers carefully. – Michael Dorgan Feb 23 at 22:16
• @will it is 66 bytes, longer than this one main(i){for(i=5*5;i--;)putchar("334#/<<#/zhi#d#vvlp#/5#/4"[i]-3);} – tsh Feb 26 at 12:10
• @tsh Nice improvement. I somehow completely overlooked passing the string directly with an index to putchar. Well combined with default int and reverse/decrement indexing too. – Will Feb 26 at 15:17
• @MichaelDorgan you are missing the commas in the output. Anyway you can save 1 byte by printing 'c' instead of 33*3 – Sheik Yerbouti Feb 27 at 22:18

Husk, 31 bytes

mȯ←←←"4/#5/#plvv#d#ihz/#<</#433

Try it online!

Explanation:

m                                 Map the function...
ȯ←←←                             Decrement character 3 times
"4/#5/#plvv#d#ihz/#<</#433  desired string "ASCII-shifted" by 3

R, 52 bytes

cat(chartr("@-K","/-:","B, C, miss a few, JJ, BAA"))

Try it online!

Encodes numbers as uppercase letters and then applies character range translation. Since we can't directly type 0-9, we expand the range by 1 character in both directions resulting in /-:.

brainfuck, 146 bytes

-[----->+>+>+>++>++<<<<<]>>>--.-----.------------.<-.------.>.>+++++++.>+++.<++++++..<.>>--------.<<.>>+++++.-.<++++.<<.>.<<++++++..>.>.<+++++.-..

Try it online!

A fairly straightforward 255/5=51 loop giving ASCII 51 and ASCII 102 as 333ff in 5 consecutive cells, followed by hunt and peck strategy.

• – tsh Feb 24 at 2:22

Perl 5, 43 bytes

say"C, D, miss a few, KK, CBB"=~y,A-L,/-:,r

Translates B-K to 0-9 (extended by one more ASCII code on each side of the range) and prints.

Try it online!

$,=", ";say 5-4,5-3,"miss a few",3*33,4*5*5 Sets the record separator, and prints a few numbers and a string. Try it online! Stax, 20 19 17 bytes saved 2 bytes thanks to Razetime ü←φr5╧wL'•↔♦$▒ò╠‼

Original brain-dead solution for reference purposes only:

Stax, 22 bytes

ü2Φÿßbÿ»f╙m¡6¿₧|░╘;┬u»

Run and debug it

• -2 – Razetime Feb 23 at 11:57

C++, 56 bytes

[]{for(int x:"4/#5/#plvv#d#ihz/#<</#433"s)putchar(x-3);}

Inspired by a comment.

Usage:

#include <string>
#include <stdio.h>

using namespace std;

int main() {
auto k = [](){for(int x:"4/#5/#plvv#d#ihz/#<</#433"s)putchar(x-3);};
k();
return 0;
}

Try it online!

• save 2 bytes by eliminating optional () as []{for(int x:"4/#5/#plvv#d#ihz/#<</#433"s)putchar(x-3);} – Tzunghsing David Wong Feb 25 at 5:28

Barrel, 31 34 bytes

+n, +n, 'miss a few, '#44+#45+n, +n

Increments the accumulator, prints it, implicitly prints some strings (, and miss a few, are implicitly printed), does a loop on accumulator incrementation, and finishes as it started.

Edit: I realized that "97" used a "9". smacks forehead

New contributor
LorenDB is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
• Welcome to Code Golf, and nice first answer! Be sure to check out this deadlineless bounty that offers reputation for showcasing new and interesting languages – caird coinheringaahing Apr 10 at 23:29
• Hi! As caird said, I've got a bounty for new and interesting languages. I'd be willing to give this answer a bounty of +100 reputation, or if you think you could demonstrate more of the language's features in another answer I could award it to that instead. – Redwolf Programs Apr 10 at 23:37
• @RedwolfPrograms: Cool! <strike>I'd golf this but I'm not sure about it because I'd have to add a feature. Hmmm....</strike> I'm working on something. – LorenDB Apr 11 at 1:37
• @LorenDB Sounds good, let me know when you've got an answer chosen/posted! – Redwolf Programs Apr 11 at 1:48
• @RedwolfPrograms: here you go :) codegolf.stackexchange.com/a/223430 – LorenDB 2 days ago

Retina 0.8.2, 32 bytes

B, C, miss a few, JJ, BAA
TLd

Try it online! Explantion:

B, C, miss a few, JJ, BAA

Replace the empty input with the literal string.

TLd

Transliterate upper case letters to digits.

Julia, 41 bytes

()->join([b"";"miss a few";b"cd"],", ")

Try it online!

the first string is "\1\2" which is allowed if I understand the challenge correctly

b"str" converts the string in an array of the value of each character so b"\1\2" => [1,2] and b"cd" => [99,100]

$k=3-3;((@(46+3),@(53-3),@('miss a few'),@(57,57),@((46+3),48,48))|%{$k++;if($k-eq3){$_}else{($_|%{[char]$_})-join''}})-join', '

Try it online!

PowerShell (Base64 one), 135 bytes

Try it online!

• @Arnuald edited the code to 3-3 – Wasif Feb 22 at 16:12
• A few bytes less? Try it online! – Zaelin Goodman Feb 22 at 19:29
• Or even less bytes (but a far less interesting answer, unfortunately): Try it online! – Zaelin Goodman Feb 22 at 19:37
• @ZaelinGoodman thanks, but that is straight copy of Arnauld answer – Wasif Feb 23 at 15:29
• Base64 in 100 tio.run/##K8gvTy0qzkjNyfn/… or am I completely overlooking a 0,1,2 or 9? – pinkfloydx33 Feb 23 at 23:30

Jelly, 23 bytes

“×ƤṪ5Ġpṃ:Ƒ5ṫȷØJkxXp⁺¥ġ»

Try it online!

Same length as caird's answer, much more boring.

• I'm glad I found a way to golf from 25 to 23, it would've been disappointing if flat compression won this! – caird coinheringaahing Feb 22 at 17:22

Python 2, 59 bytes

print ', '.join(map(str,(4-3,5-3,'miss a few',33*3,5*5*4)))

Try it online!

Thanks to @arnauld for js answer

• 57 bytes with  instead of str and 55 bytes by manually placing ,. – ovs Feb 23 at 22:13

Jelly, 22 bytes

³ḊĖ.ịṚj“¤mɗʂɠẉ⁾»W¤j⁾,

A full program that prints the result.

Try it online!

How?

³                      - 100
Ḋ                     - dequeue -> [2,3,...,99,100]
Ė                    - enumerate -> [[1,2],[2,3],...,[98,99],[99,100]]
.                   - 0.5
ị                  - index into -> [[99,100],[1,2]]
Ṛ                 - reverse
“¤mɗʂɠẉ⁾»       -   dictionary compression of "miss a few"
W      -   wrap in a list  -> ["miss a few"]
j                - join              -> [1,2,"miss a few",99,100]
⁾,  - ", "
j    - join              -> [1,", ",2,", ","miss a few",", ",99,", ",100]
- implicit print    -> 1, 2, miss a few, 99, 100

Pyth, 29 bytes

j+\,d[=hZhZ"miss a few"t=*TTT

Try it online!

Python 3.8 translation:

Z=0
T=10

print(", ".join(map(str,[(Z:=Z+1),Z+1,"miss a few",(T:=T*T)-1,T])))

PHP, 48 bytes

<?=join(', ',[!'',~-3,'miss a few',33*3,45^73]);

Try it online!

05AB1E, 16 bytes

I don't think this would be shorter with 0, 1, 2 and 9.

XY…š§€…†Óт<т„, ý

Try it online!

X                # push 1
Y               # push 2
…š§€…†Ó        # push compressed dictionary string "miss a few"
т<      # push 100-1
т     # push 100
„,   # push string ", "
ý # join the stack with this string
• Nice, the solution I came up with was the same but starting with ≠x instead of XY. – Makonede Feb 23 at 21:42

i3, 3, miss a few, 8, <esc>|<C-x><C-x>l.l<C-a>ylp$pp<C-a> PHP, 58 54 bytes <?=join(', ',[$i=3/3,++$i,'miss a few',$i=33*3,++\$i]);

PHP doesnt really want to be typed short, but I liked coming up with this :)

Perl 6, 46 bytes

say join ", ",5-4,5-3,"miss a few",3*33,4*5*5;

Try it online!

Vyxal, 2120 19 bytes

3ɽ÷«eeȮǒḋp«₁‹₁W‛, j

Try it Online!

Explained

3ɽ÷      # stack = [1, 2]
«eeȮǒḋp« # stack = [1, 2, "miss a few"]
₁‹₁      # stack = [1, 2, "miss a few", 99, 100]
W‛, j    # join stack on ", "