Your goal is to draw the Linkin Park Logo in minimum bytes.
Please add a title with the language and the number of bytes in your code.
<?=l(11,0).l(3,1)."\n".l(10,0).l(3,1)."\n".l(9,0).l(3,1).l(9,0).l(3,1)."\n".l(8,0).l(3,1).l(9,0).l(5,1)."\n".l(7,0).l(3,1).l(9,0).l(3,1).l(1,0).l(3,1)."\n".l(6,0).l(3,1).l(9,0).l(3,1).l(3,0).l(3,1)."\n".l(5,0).l(3,1).l(9,0).l(3,1).l(5,0).l(3,1)."\n".l(4,0).l(3,1).l(9,0).l(3,1).l(7,0).l(3,1)."\n".l(3,0).l(27,1)."\n".l(14,0).l(3,1)."\n".l(13,0).l(3,1)."\n".l(12,0).l(3,1)."\n".l(11,0).l(3,1)."\n";function l($a,$c,$o=''){if($c){$c='=';}else{$c=' ';};for($i=0;$i<$a;$i++){$o.=$c;}return $o;}
Ok actually it's longer than write an echo with the logo but It's the first thing which has hit my mind.
e=' '
z=6*e
x='==='
f=z+x
for i in[e*10+x,e*9+x,e*8+x,e*7+x+f,e*6+x+f+'==',e*5+x+f+e+x,e*4+x+f+e*3+x,e*3+x+f+e*5+x,
e*2+x+f+e*7+x,e+x*8,x*8,e*8+x,e*7+x,e*6+x]:
print i
I'm sure it can (and will be) done in shorter code. Output:
===
===
===
=== ===
=== =====
=== === ===
=== === ===
=== === ===
=== === ===
========================
========================
===
===
===
[Finished in 0.1s]
Try it for yourself, python 2.7.
#include<iostream.h>
#include<conio.h>
void linkinparklogo(int posx, int posy) //Linkin Park Logo Starts
{
highvideo();
for(int slant=0; slant<=10; slant++) //Slant Part of "L"
{
for(int l=1; l<=3; l++)
{gotoxy(posx+10-slant+l,posy+1+slant); cprintf("=");}
}
getch();
for(int straight=0; straight<=20; straight++) //Lower Part of Horizontal"L"
{ gotoxy(posx+4+straight,posy+11); cprintf("=");
}
getch();
for(straight=0; straight<=22; straight++) //Upper Part of Horizontal "L"
{ gotoxy(posx+3+straight,posy+10); cprintf("=");
}
getch();
for(slant=0; slant<=5; slant++) //Right Slant Part of "P"
{
for(int p=1; p<=3; p++)
{gotoxy(posx+21-slant+p,posy+9-slant); cprintf("=");}
}
getch();
gotoxy(posx+17,posy+5); cprintf("=");
gotoxy(posx+16,posy+5); cprintf("=");
getch();
for(slant=0; slant<=9; slant++) //Left Slant Part of "P"
{
for(int ps=1; ps<=3; ps++)
{gotoxy(posx+14-slant+ps,posy+6+slant); cprintf("=");}
}
} //Linkin Park Logo Created
void main()
{
clrscr();
linkinparklogo(0,0);
getch();
}
User gives 2 characters which will be used as foreground and background, spaces will work too.
uses idglobal;//Required for IIF function
var
i:int8;
s:string;
fg,bg:char; //Foreground + Background
function soc(c:char;Cnt:integer=3):string;
begin
Result:=StringOfChar(c, cnt)
end;
begin
writeln('Give foreground and background characters');
Readln(fg,bg);
for I:=0to 16do
begin
s:='';
if i in[0,16]then
begin
s:=soc(bg,29);
WriteLn(s);
continue
end;
if i in[1,2,3,4,5,6,7,8,9,10,11]then
s:=soc(bg,17-i-3)+iif(i in[10,11],soc(fg,24),soc(fg))
else if i in[12,13,14,15]then
s:=soc(bg,(17-i-3)+8)+soc(fg);
if i in[4,5,6,7,8,9]then
s:=s+soc(bg,6);
case i of
4:s:=s+soc(fg);
5:s:=s+soc(fg,5);
6:s:=s+soc(fg)+bg+soc(fg);
7:s:=s+soc(fg)+soc(bg)+soc(fg);
8:s:=s+soc(fg)+soc(bg,5)+soc(fg);
9:s:=s+soc(fg)+soc(bg,7)+soc(fg);
end;
s:=s+soc(bg,29-length(s));
WriteLn(s);
end;
readln;
end.
I must add to this that it looks much better in console lol.
Input: $/ Input: (space)=
Output: Output:
///////////////////////////// =============================
/////////////$$$///////////// ============= =============
////////////$$$////////////// ============ ==============
///////////$$$/////////////// =========== ===============
//////////$$$//////$$$/////// ========== ====== =======
/////////$$$//////$$$$$////// ========= ====== ======
////////$$$//////$$$/$$$///// ======== ====== = =====
///////$$$//////$$$///$$$//// ======= ====== === ====
//////$$$//////$$$/////$$$/// ====== ====== ===== ===
/////$$$//////$$$///////$$$// ===== ====== ======= ==
////$$$$$$$$$$$$$$$$$$$$$$$$/ ==== =
///$$$$$$$$$$$$$$$$$$$$$$$$// === ==
//////////$$$//////////////// ========== ================
/////////$$$///////////////// ========= =================
////////$$$////////////////// ======== ==================
///////$$$/////////////////// ======= ===================
///////////////////////////// =============================
Feels weird :P
An objective primary winning criterion
. How how you measuring entries against each other? \$\endgroup\$