# 400th Question Celebration/Challenge [closed]

I just looked and saw that there are 399 questions on this wondrous "Programming Puzzles & Code Golf" site!!! That means that...THIS IS THE 400th question!!! To celebrate this momentous occasion, here are your goals:

1. Write a piece of code that is EXACTLY 400 bits.

• That's right...BITS!!!
• For the risk of redundancy and the sake of clarity, that's 50 bytes!!!
2. Because this occasion is so extraordinarily meaningful, each bit and therefore each byte must also be meaningful!

• In other words: You can't just name a variable aaaaa because you needed 32 extra bits to get to 400. However, you can rename it to party as long as that is a meaningful name for that variable.
3. Your program must do something appropriate (not necessarily output something appropriate) to celebrate this grand occasion!

• For example: You could choose to make a program that outputs 400. However, I must needs state that although submitting code that does only that would meet this requirement, it would also be like celebrating your birthday party at home by yourself sick in bed. At least you celebrated, but hey: You can do better!!!
4. The most creative code wins!!! In this case, creativity will be measured by votes.

5. This contest will last until 400 users have viewed this question. If there is a tie when the 400th user views this question, the contest will go into sudden-death overtime until there is a clear winner

Oh, and lest I forget...HAPPY 400th QUESTION!!!

• I added the tag code-shuffleboard, as someone suggested on meta. – Joey Adams Aug 12 '11 at 22:50
• it's not the 400th question anymore :( – ratchet freak Aug 13 '11 at 2:15
• 20 Users to go! Get your votes in! – Briguy37 Aug 24 '11 at 18:18
• I think I'm the 400th viewer. – zzzzBov Aug 25 '11 at 18:35
• I'm closing this question as off-topic because rules 2 and 3 do not constitute objective validity criteria. – Martin Ender Nov 21 '16 at 10:58

### Python, FOUR HUNDRED bits

i=0
while 1:print" "*(i%8>3 and-i%4 or i%4),0;i+=1

At first I wanted to make a sine scroller, but there was no place for the import. Now you get a bugged triangle wave. ~~~party~~~

• Fixed version: while 1:print" "*[i%8,-i%4 or 4][i%8>3],0;i+=1 – JBernardo Dec 30 '13 at 0:11

# Brainf*ck

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


And the output will be: 400!

## Ruby

1.upto(side=gets.to_i){|i|puts (?**i).center side}


This creates a wobbling tree, like the following:

   *
**
***
****
*****
******
*******


### Scala gratulates with 400 Bits:

(1 to 400).map(x=>print("""
,
|_|
"""))


Sample:

 ,
|_|

,
|_|

,
|_|

,
|_|


... due to restrictions, I couldn't light bigger candles. I try to compensate with the scheer number.

• By my count that is only 304 bits (38 Bytes). This question will have to take a DEEP breath to blow out all these candles, though...Nice! – Briguy37 Aug 15 '11 at 15:30
• You're right, I picked the wrong variant, which only had 39 Bytes (38?), but had the problem, that the lower candles melted the upper ones. We absolutely need a bigger vertical distance to prevent London-like-lightenings. – user unknown Aug 15 '11 at 16:13
• Here's a variation with 400 bits and 400 candles in a square: for(i<-1 to 20;x<-Seq(" , ","|_| "))println(x*20) :) – Luigi Plinge Nov 20 '11 at 2:48
• you lost a blank: for(i<-1 to 20;x<-Seq(" , ","|_| "))println(x*20) - oh, I lost it too! A bug? – user unknown Nov 21 '11 at 12:19

### JavaScript, 400 bits

Code

for(i=0,a='';i<400;)a+='\n!'+i++;alert(a+"\n400!")


Output

!0
!1
!2
!3
..
..
!398
!399
400!


Or, how it is read in English: "not 0, not 1, not 2, not 3 .. not 398, not 399, 400!"

Update

Just realized I forgot to attach the Fiddle for this problem!

# HTML

<marquee style="font-size:400px">~!400!~</marquee>


# Python

50 characters or 400 bits as metered by other submissions.

i,j=1,1
while len(str(i))<81:
print i
i,j=j,i+j


Simple fibonacci calculator, which terminates once the output no longer fits in a standard 80x60 terminal. Not especially festive I know, but the best I could come up with on short notice. More to follow!

Here comes C#!

class P{static void Main(){System.Console.Write("400!");}}


Ok, that is the smallest, running / valid, and remarkable thing i could squeeze out of .NET! But it fails by 13bytes! (code is 63bytes). Someone might suggest an improvement :D

Maybe using the roman numeral version might slash off an extra byte :-)

class P{static void Main(){System.Console.Write("CD!");}}


Bits of code, or bits compiled? Ah well, I see nobody has posted any x86 yet, so here goes...

## x86

4D 5A 90 00 03 00 00 00 40 00 00 0F FF F0 00 0B 80 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


IDK if this counts, it's the first 400 bits (in hex) of a Win32 PE executable

## VB.NET

Sub Main()
Console.WriteLine("400 CodeGolf")
End Sub


## Yet another Python answer.

k=(1,)
while len(k)<400:k+=(sum(k[-2:]),)
print(k)


Print the first 400 Fibonacci numbers. I notice one of the other Python answers also does the Fibonacci sequence... Oh well. I came up with this method of calculating Fibonacci numbers while working on another code golf and I thought it was neat so I figured I'd answer anyway.

with P;procedure C is begin P("400! Yay!");end C;


assuming there is a package p:

$cat p.ads procedure P(S:String);$ cat p.adb
procedure P(S:String) is
begin
end P;


If I put with Text_IO; and Text_IO.Put("") into the source code I would already exceed the limit by 7 bytes, without outputting anything.. Ada is hard to golf.

• I put in a clarification to the question so you don't have to worry about importing input/output libraries. Hope this helps! – Briguy37 Aug 15 '11 at 15:20

Shells with banner installed

banner -w80 HAPPY  HAPPY  HAPPY  400th  QUESTION!


# Perl

$number_400=400;$and_still_number_400=$still_number_400*4/4;$when_is_the_500_post="In 100 posts!!";
print $number_400*400/400; # # ########## ########## # # # # # # # # # # # # ######## # # # # # # # # # # # # # # # # # # # # ########## ##########  • This solution isn't the required length (400 bits). – Joey Adams Aug 20 '11 at 4:21 • On my computer, it shows up exactly 400 bits. – Dynamic Aug 20 '11 at 13:46 • you mean 400 bytes? – bcc32 Aug 24 '11 at 17:43 • @bcc32: My laptop says 400 bits. IDK what is wrong. – Dynamic Aug 24 '11 at 18:13 • That's one modern laptop you got there, we're still stuck with 64bit CPU's... :( – st0le Aug 26 '11 at 10:59 Perl /*Life:Eat,sleep,then die */ $rip=400;$pork="Pi";chop($pork);sleep(\$rip);die();

• ...- is V, so currently it looks like it prints V000 400 times. – Briguy37 Aug 24 '11 at 18:23
• Yup it surely does..'....-' = 4. Missed a dot. That exceeds my bit limit..back to the drawing board – zundarz Aug 24 '11 at 19:12