# Print this maximally long URL

This one is simple. We want to compress a URL, but don't trust URL shorteners.

Write a program that prints to stdout (or a 0-argument function that returns) the following, working URL:

http://a.b.c.d.e.f.g.h.i.j.k.l.m.n.oo.pp.qqq.rrrr.ssssss.tttttttt.uuuuuuuuuuu.vvvvvvvvvvvvvvv.wwwwwwwwwwwwwwwwwwwwww.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy.zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.me

Code golf, standard rules.

You may output uppercase or lowercase.

Leading or trailing whitespace is ok.

## Context

Explanation taken from the website:

The domain is created to reach the maximum number of allowed characters (255 (really 253)) with an exponential curve in the length of the letters as you proceed through the alphabet. The formula used is "1 + 62 * (10/7)^(x-26)". To help illustrate this curve, reference the distribution on this spreadsheet. It's colorful because I like colors and wanted to do a progressive "rainbow" animation in CSS3.

# 05AB1E, 252423 21 bytes

žXAS.7Ƶ-t∞-m>×….me¬ýJ


-1 byte thanks to @Neil's analysis that *(10/7)** is the same as /.7**.
-3 bytes thanks to @Grimmy using a different formula and ingenious use of ý!

Try it online.

Explanation:

The formula used to get the correct amount of characters of the alphabet, where $$\n\$$ is the 1-based index of the alphabetic letter:
$$\a(n) = \left\lfloor0.7^{(\sqrt{208}-n)}+1\right\rfloor\$$

žX                     # Push builtin "http://"
Ƶ-               # Push compressed 208
t              # Take the square-root of that: 14.422...
∞             # Push an infinite list of positive integers: [1,2,3,...]
-            # Subtract each from the 14.422...: [13.442...,12.442...,...]
.7     m           # Take 0.7 to the power of each of these: [0.008...,0.011...,...]
>          # Increase each by 1: [1.008...,1.011...,...]
AS                   # Push the lowercase alphabet as list of characters,
×         # and repeat each the calculated values amount of times as string
# (which implicitly truncates the floats to integers, and ignores
#  the floats beyond the length of the alphabet)
….me     # Push ".me"
¬    # Push its head (the "."), without popping the ".me" itself
ý   # Join with delimiter. Normally it will use the top value as
# delimiter and joins the top-1'th list. In this case however, the
# top-1'th item is a string, so instead it will join the entire stack
# together. BUT, because the stack contains a list, it will instead
# only join all lists on the stacks by the "." delimiter
J  # And finally join the three strings on the stack together
# (after which this result is output implicitly)


See this 05AB1E tip of mine (section How to compress large integers?) to understand why Ƶ- is 208.

• 05AB1E even has a builtin for "http://". I'm impressed – Embodiment of Ignorance Feb 7 at 2:40
• @EmbodimentofIgnorance Yep. žX is "http://"; žY is "https://" and žZ is "http://www." :) – Kevin Cruijssen Feb 7 at 7:20
• 22 – Grimmy Feb 7 at 15:04
• 21 (: Also, here's a 20 that almost works (1 extra v, 1 missing z). – Grimmy Feb 7 at 17:35
• @Grimmy Very nice! Both the new formula with sqrt(208) and how you've used the ý to join the list somewhere on the stack is ingenious! :D – Kevin Cruijssen Feb 7 at 18:08

# Python 3, 86 $$\\cdots\$$ 81 77 bytes

Saved 3 bytes thanks to mypetlion!!!
Saved 4 bytes thanks to Shieru Asakoto!!!

print(f"http://{'.'.join(chr(i+97)*int(1+.7**-i/120)for i in range(26))}.me")


Try it online!

Uses Shieru Asakoto's 0-based formula.

• 81 bytes: print(f"http://{'.'.join(chr(i+122)*int(1+62*1.43**i)for i in range(-25,1))}.me") – mypetlion Feb 5 at 23:47
• @mypetlion Clever reshuffle of braced expressions - thanks! :-) – Noodle9 Feb 5 at 23:52
• 77 bytes when using an alternative formula. – Shieru Asakoto Feb 6 at 1:00
• @ShieruAsakoto Was just adding that - thanks! :-) – Noodle9 Feb 6 at 1:01

# APL (Dyalog), 41 38 bytes

-3 bytes thanks to Bubbler

2⌽'mehttp://',∊'.',¨⍨⎕A⍴¨⍨⌊1+62×.7*⍒⎕A


Try it online!

Outputs the URL with the letters capitalised. Uses the 0 indexed formula $$\ \lfloor 1 + 62 \times 0.7^{25-x} \rfloor \$$, since $$\ (\frac{10}{7})^{x-25} = ((\frac{7}{10})^{-1})^{x-25} = (\frac{7}{10})^{25-x}\$$

### Explanation:

2⌽                         ⍝ Rotate by two places (moving the 'me' to the end)
'mehttp://'              ⍝ The start string
,             ⍝ Followed by
∊               ⍝ The flattened string of
'.'            ⍝ A period
,⍨¨         ⍝ Appended to the end of each of
⎕A            ⍝ The uppercase alphabet
⍴¨⍨         ⍝ Where each letter is repeated by
⌊               ⍝ The floor of
1+             ⍝ 1 plus
62×          ⍝ 62 times
.7*       ⍝ 0.7 to the power of
⍒⎕A  ⍝ The range 26 to 1

• are the final two dots in ,⍨¨ the equivalent of J's rank 0 adverb "0? Does APL have the ability to specify other specific ranks? – Jonah Feb 6 at 1:52
• @Jonah Yes, ¨ is the each function, which applies an operator to each element of the vector. I don't think you can specify rank with that specific function, though I'm not an expert with APL. Try asking Adam in chat – Jo King Feb 6 at 2:01
• @Jonah f¨ is like J's stdlib's each, or f&.:>"0. The "0 part is ⍤0 in APL. Unfortunately, we don't have J's (new) L: (though I'm arguing for adding it as ⍥). – Adám Feb 6 at 6:16

# Perl 5, 6157 55 bytes

-4 bytes thanks to @Neil

say"http://",(map{$_ x(1+62/.7**(++$p-26))."."}a..z),me


Try it online!

• I think *(10/7)** is the same as /(7/10)** or /.7**. – Neil Feb 6 at 1:10

# JavaScript (Node.js), 77 bytes

Based on @ShieruAsakoto's formula. Builds the URL recursively.

f=n=>n>25?".me":(n?".".padEnd(2+.7**-n/120,Buffer([97+n])):"http://a")+f(-~n)


Try it online!

# Java (JDK), 108 bytes

v->{var s="HTTP://";for(char c=64,t;++c<91;s+=(""+c).repeat(t/=Math.pow(.7,c-90))+c+".")t=62;return s+"ME";}


Try it online!

## Credits

• -4 bytes thanks to Kevin Cruijssen
• Very likely golfable using math. – Olivier Grégoire Feb 6 at 10:06
• -3 byte using 62/Math.pow(.7,c-122) (credit goes to @Neil). – Kevin Cruijssen Feb 6 at 10:22
• And an additional -1 with for(char c=96,t;++c<123;s+=(""+c).repeat(t/=Math.pow(.7,c-122))+c+".")t=62; – Kevin Cruijssen Feb 6 at 10:28

# Charcoal, 27 bytes

http://⭆β⁺×ι⊕×⁶²Ｘ·⁷⁻²⁵κ.¦me


Try it online! Link is to verbose version of code. Explanation:

http://                     Implicitly print literal string http://
β                   Lowercase alphabet
⭆                    Map over letters and join
κ     Current index
⁻²⁵      Subtract from 25
Ｘ·⁷         Raise 0.7 to that power
×⁶²            Multiply by 62
⊕               Increment
×ι                Repeat letter that many times
⁺             .    Concatenate literal string .
¦   Implicitly print
me Implicitly print literal string me


# Jelly, 494846 31 bytes (send help)

26RU.7*×89ĊØa×⁾meṭj”.“http://”;


-2 bytes thanks to Kevin

-15 bytes thanks to Nick!

I never wrote anything this complex in Jelly and the tacicity isn't obvious to me yet... So this is very golfable (see 49 byte link). I would appreciate feedback and golfing tips in small chunks so that I can digest it!

You can try this online.

• Your https:// can be http:// ;) – Kevin Cruijssen Feb 6 at 12:31
• @KevinCruijssen gosh, I missed this entirely :D ty – RGS Feb 6 at 13:22
• Np. Unfortunately I can't really help you with the rest, since I don't know a lot about Jelly. Only thing that comes to mind is removing the trailing ”, since it's closed implicitly to save a byte. But since my 05AB1E answer is 23 bytes, I'm sure <30 should be easily possible for Jelly as well. ;) – Kevin Cruijssen Feb 6 at 13:25
• Here’s a 31 byte answer for comparison. In general, it’s helpful to try to have a single link that proceeds from left to right whenever possible. Other useful hints include use of j (join) for your last line (though I’ve changed it to add the me earlier), use of the Ø nilads, reversing the order of the list rather than subtracting from 26. Happy for you to use my answer (and improve it if possible). Note it was derived from @KevinCruijsen’s answer. It’s longer because of the “http://” – Nick Kennedy Feb 6 at 19:56
• @NickKennedy this was an unbelievable byte discount. I'll have to digest your submission calmly. Thanks a lot! – RGS Feb 6 at 22:20

# Wolfram Language (Mathematica), 71 bytes

"http://"<>Array[Table[Alphabet[][[#]],1+1.43^(#-26)62]<>"."&,26]<>"me"


Try it online!

# JavaScript (Node.js), 93 bytes

_=>http://${[...Array(26)].map((x,i)=>Buffer(Array(1+.7**-i/120|0).fill(97+i))).join.}.me  Try it online! When turning the formula into 0-indexed, the formula becomes $$\1+62\times(\frac{10}{7})^{x-25}=1+0.0083146\times0.7^{-x}\$$, and then 0.0083146 is approximated by 1/120. • Same length variant: _=>http://${"abcdefghijklmnopqrstuvwxuz".replace(/./g,(x,i)=>x.repeat(1+.7**-i/120)+.)}me  – Neil Feb 6 at 1:08
• 77 bytes – Arnauld Feb 6 at 5:57
• @Arnauld I suggest you post it as a separate answer because the approach is quite different on this. I've rolled back your golf to let you post it. – Shieru Asakoto Feb 6 at 5:59

# C (gcc), 99 bytes

n;f(i){for(i=printf("http://");i<33;)for(n=62/pow(.7,i++-32)+2;n--;)putchar(n?89+i:46);puts("me");}


-3 or so bytes thanks to Noodle9!

-8 bytes thanks to gastropner!

Try it online!

# Japt, 29 bytes

;http://{C®p.7**T´/#xÄ +'.}´


Saved 2 bytes thanks to @Shaggy

Test it

• – Shaggy Feb 6 at 8:19
• @Shaggy Thanks, I forgot that ** exists – Embodiment of Ignorance Feb 7 at 2:34

# Ruby, 64 bytes

Conveniently, when multiplying a string with a non-whole positive number, Ruby truncates the number to determine how many times to repeat the string.

puts"http://#{(?a..?z).map{|c|c*(1+62/0.7**(c.ord-122))}*?.}.me"


Try it online!

# MATLAB 92 bytes

b="";for i=1:26;b=b+repelem(char(96+i),floor(1+62*(10/7).^(i-26)))+".";end;"http://"+b+"me"


# C++ (gcc), 126 123 bytes

-3 bytes thanks to S.S. Anne

Some acrobatics needed to avoid having to include cmath.

#import<map>
using s=std::string;s f(){s r="http://";for(float i=26,p=7456;i--;p*=.7)r+=s(1+62/p,122-i)+'.';return r+"me";}


Try it online!

• You could use bits/stdc++.h and use cmath's functions. – S.S. Anne Feb 6 at 18:00
• @S.S.Anne I might misunderstand you, but that would take even more bytes to include than cmath. – gastropner Feb 6 at 20:45
• But not string and cmath combined. Instead of #import<string> #import<cmath> (in this hypothetical solution) you could do #import<bits/stdc++.h>. – S.S. Anne Feb 6 at 20:55
• @S.S.Anne Oh, I see what you mean! Had no idea about that one. Sadly it came out longer, doing that. – gastropner Feb 6 at 21:08
• Well, then string can be replaced with map for -3 bytes. – S.S. Anne Feb 6 at 21:11