You are to print this exact text:
ABABABABABABABABABABABABAB
BCBCBCBCBCBCBCBCBCBCBCBCBC
CDCDCDCDCDCDCDCDCDCDCDCDCD
DEDEDEDEDEDEDEDEDEDEDEDEDE
EFEFEFEFEFEFEFEFEFEFEFEFEF
FGFGFGFGFGFGFGFGFGFGFGFGFG
GHGHGHGHGHGHGHGHGHGHGHGHGH
HIHIHIHIHIHIHIHIHIHIHIHIHI
IJIJIJIJIJIJIJIJIJIJIJIJIJ
JKJKJKJKJKJKJKJKJKJKJKJKJK
KLKLKLKLKLKLKLKLKLKLKLKLKL
LMLMLMLMLMLMLMLMLMLMLMLMLM
MNMNMNMNMNMNMNMNMNMNMNMNMN
NONONONONONONONONONONONONO
OPOPOPOPOPOPOPOPOPOPOPOPOP
PQPQPQPQPQPQPQPQPQPQPQPQPQ
QRQRQRQRQRQRQRQRQRQRQRQRQR
RSRSRSRSRSRSRSRSRSRSRSRSRS
STSTSTSTSTSTSTSTSTSTSTSTST
TUTUTUTUTUTUTUTUTUTUTUTUTU
UVUVUVUVUVUVUVUVUVUVUVUVUV
VWVWVWVWVWVWVWVWVWVWVWVWVW
WXWXWXWXWXWXWXWXWXWXWXWXWX
XYXYXYXYXYXYXYXYXYXYXYXYXY
YZYZYZYZYZYZYZYZYZYZYZYZYZ
ZAZAZAZAZAZAZAZAZAZAZAZAZA
Specs
- You can print all lowercase instead of all uppercase. However, case must be consistent throughout the output.
- You may print one extra trailing linefeed.
Scoring
Since this is an alphabet wave that fluctuates to a small extent, your code should also be small in terms of byte-count. In fact, the smallest code in terms of byte-count wins.
-
40\$\begingroup\$ Seriously, another alphabet challenge? \$\endgroup\$Nathan Merrill– Nathan Merrill2016年08月09日 23:33:12 +00:00Commented Aug 9, 2016 at 23:33
-
6\$\begingroup\$ @NathanMerrill As numerous as they are, I don't think they are worthy of downvotes. (I do not imply you downvoted, I am merely saying.) \$\endgroup\$Conor O'Brien– Conor O'Brien2016年08月09日 23:34:07 +00:00Commented Aug 9, 2016 at 23:34
-
14\$\begingroup\$ As long as the patterns are sufficiently different, I don't think it matters if we use the alphabet, decimal digits, asterisks and underscore, etc. \$\endgroup\$Dennis– Dennis2016年08月09日 23:35:42 +00:00Commented Aug 9, 2016 at 23:35
-
9\$\begingroup\$ @Dennis regardless of the characters used, its these type of "pattern" challenges that are getting overused, IMO. I don't think its offtopic, but I would enjoy some fresh air. \$\endgroup\$Nathan Merrill– Nathan Merrill2016年08月09日 23:40:33 +00:00Commented Aug 9, 2016 at 23:40
-
16\$\begingroup\$ It's clear there's no more demand for alphabet challenges - only 39 people answered in the first 15 hours... \$\endgroup\$trichoplax is on Codidact now– trichoplax is on Codidact now2016年08月10日 15:23:58 +00:00Commented Aug 10, 2016 at 15:23
99 Answers 99
Excel VBA, 50 Bytes
Anonymous VBE immediate window function that takes no input and outputs a wave to the range [A1:Z26] on the ActiveSheet object
[A1:Z26]="=Char(Mod(Row()+IsEven(Column()),26)+64)
Yabasic, 69 bytes
For I=1To 26
For J=0To 12
?Chr$(I+64)+Chr$(Mod(I,26)+65);
Next
?
Next
Python 2, 78 bytes
a="abcdefghijklmnopqrstuvwxyz"
for i in range(len(a)):print(a[i]+a[-~i%26])*13
-
\$\begingroup\$ Is this a valid -2 shave:
a="abcdefghijklmnopqrstuvwxyza"\nfor i in range(len(a)):print(a[i]+a[-~i])*13? it errors, but iirc the meta consensus is to ignore error output \$\endgroup\$thejonymyster– thejonymyster2021年12月27日 17:31:28 +00:00Commented Dec 27, 2021 at 17:31
Stax, 8 bytes
┘;2Q╛e≥M
Run and debug it at staxlang.xyz!
Unpacked (10 bytes)
VAc|(\m13*
VA uppercase alphabet
c|( and a copy rotated by one
\ zip, producing an array of length-2 strings
m map and print each:
13* repeat 13 times
Uiua, (削除) 20 (削除ここまで) 17 bytes
≡&p+@A◿26⊞+⤙◿2⇡26
Try it: Uiua pad
Fun array-langy way of doing it. Takes the addition table of the range to 26 and that mod 2, then takes that mod 26 so after Z is A, and add the character A to each.
C#, (削除) 115 (削除ここまで) 114 Bytes
for(var c='A';c<='Z';c++)Console.WriteLine(String.Join("",Enumerable.Repeat($"{c}{(char)Math.Min('A',c+1)}",12)));
Tcl, 80 bytes
time {puts [string repe [format %c%c [expr [incr i]+64] [expr $i%26+65]] 13]} 26
while {[incr i]<27} {puts [string repe [format %c%c [expr $i+64] [expr $i%26+65]] 13]}
(削除ここまで)
AWK, 63 bytes
{for(;i++<26;print)for(j=0;j++<13;)printf("%c%c",i+64,i%26+65)}
I hate having two prints in there, but can't find a way out (without using more bytes).
Explore related questions
See similar questions with these tags.