text:
ASCII Landscapes
Objective: Write a program that generates beautiful (?) ASCII-art landscapes and skylines!
Your program has just one input: a string composed of any combination/repetition of the chars 0123456789abc.
For each input character, output a vertical line composed as follows:
         .
        ..
       ...
      oooo
     ooooo
    OOOOOO
   OOOOOOO
  XXXXXXXX
 XXXXXXXXX
XXXXXXXXXX

0123456789

Letters abc instead are followed by one number n, and draw the vertical line n with respectively 1,2 or 3 holes (spaces) at the bottom.
Examples
The Chrysler Building
Input: 2479742
   .
   .
  ...
  ooo
  ooo
 OOOOO
 OOOOO
XXXXXXX
XXXXXXX
XXXXXXX

The Taj Mahal
Input: 0804023324554233204080
 .                  .
 .                  .
 o                  o
 o        oo        o
 O O     OOOO     O O
 O O  OO OOOO OO  O O
 X X XXXXXXXXXXXX X X
 X X XXXXXXXXXXXX X X
XXXXXXXXXXXXXXXXXXXXXX

The Eiffel Tower
Input: 011a2b3b5c9c9b5b3a2110
      ..
      ..
      ..
      oo
     oooo
     OOOO
    OOOOOO
   XXX  XXX
 XXX      XXX
XXX        XXX

You can assume input is not empty and that it's well-formed.
Any language is accepted, from A+ to Z++.
This is code-golf: the shortest source code wins.
If anything in the rules is not clear, feel free to ask below in the comments.
Have fun, and capture hundred meters high structures in a few bytes!
(and don't forget to include your favourite building in your solution)
P.S.: no, you can't download/access data from the Internet, use your file name as data and all that stuff. Be fair, and use only your code-golf skills.

Seems tall 9 to me...:-?

Oh, I see it: the top is defined as "c9", that means: draw a vertical line with height 9 and shave off the 3 bottom chars. That's why it seems tall 7 to you. Read the rules again and tell me if it's ok.

ok, i misread your specification of the offset.

C, 130 126 chars
Kinda long compared to the competition, but I blame the language...
char*p,b[99];r=10,q;main(o){for(gets(&b);r--;puts(""))
for(p=b;q=*p++;)o=q<60?putchar("XXXOOoo... "[o<r&r<q-47?r:10]),-1:q-97;}

I don't know about favourite building, but one of the more recognizable ones around here is Globen, so here is a poor rendition of it.
% ./a.out <<<24556667777776665542

       ......
    oooooooooooo
  oooooooooooooooo
 OOOOOOOOOOOOOOOOOO
 OOOOOOOOOOOOOOOOOO
XXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXX

You can chop off a character by switching the declaration order of char b[99],*p; so it reads char*p,b[99];. Also it may be shorter to use puts for printing the newline.

@C0deH4cker nice, thanks! That saves me four chars.

@friol oh, I didn't mean it like that at all, it's just that I dunno what I'd consider my favourite building. :P

Python 2.7 - 186
Probably can be shorter...
x=[]
l=iter(raw_input())
a="XXX00oo..."
for i in l:
 try:i=int(i);o=0
 except:o=" abc".index(i);i=int(next(l))
 x.append(" "*o+a[o:i+1]+" "*(9-i))
for i in zip(*x)[::-1]:print''.join(i)

Sample run:
08040233245542332040800000247974200000011a2b3b5c9c9b5b3a2110
                             .              ..
 .                  .        .              ..
 .                  .       ...             ..
 o                  o       ooo             oo
 o        oo        o       ooo            oooo
 0 0     0000     0 0      00000           0000
 0 0  00 0000 00  0 0      00000          000000
 X X XXXXXXXXXXXX X X     XXXXXXX        XXX  XXX
 X X XXXXXXXXXXXX X X     XXXXXXX      XXX      XXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX        XXX

Sydney Harbour Bridge
a1a13443a1a2a3a4a5a6a6a7a7a8a8a8a8a9a9a9a9a9a9a8a8a8a8a7a7a6a6a5a4a4a3a2a13443a1a1
                   ......
               ..............
             ..................
           oooooooooooooooooooooo
          oooooooooooooooooooooooo
   00    000000000000000000000000000    00
  0000  00000000000000000000000000000  0000
  XXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  XXXX                                 XXXX

Golden gate bridge / Cisco logo
a2a0a0a4a0a06a0a0a4a0a0a2a0a0a4a0a06a0a0a4a0a0a2

      o           o
      o           o
   0  0  0     0  0  0
   0  0  0     0  0  0
X  X  X  X  X  X  X  X  X
X  X  X  X  X  X  X  X  X
      X           X

Great question by the way!

Great monuments! :)

C64 BASIC, 276 PETSCII chars
My own solution, golfed down to 276 chars and 10 lines of BASIC V2.0!
0inputa$:dIc$(10):fOi=0to9:rE c$(i):nE:fOr=0to9
1z=1
2c=aS(mI(a$,z,z+1))
3ifc>57tHgO8
4ifc>=57-r tH?c$(9-r);:gO6
5?" ";
6z=z+1:ifz<=len(a$)gO2
7?:nE:eN
8z=z+1:w=aS(mI(a$,z,z+1)):ifw>=57-r aNc<=73-r tH?c$(9-r);:gO6
9?" ";:gO6:dA"x","x","x","o","o","W","W",".",".","."

(copy and paste in an emulator to see the result).
And finally, my favourite monument, the Brooklyn Bridge :)

GolfScript, 69
'XXXOOoo...':s\{.96>{96-.' '*\@>+}{47-<' '10*+10<s\}if}%10/zip-1%n*\;

Not far off the APL solution.
Test online

Ruby, 88 85
Fun challenge!
9.downto(0){|h|puts$*[0].gsub(/(\D?)(.)/){'XXXOOoo... '[h<$1.hex-9||$2.hex<h ?-1:h]}}

Takes input on the commandline, eg:
ruby landscapes.rb 011a2b3b5c9c9b5b3a2110

Will print out:
      ..
      ..
      ..
      oo
     oooo
     OOOO
    OOOOOO
   XXX  XXX
 XXX      XXX
XXX        XXX

APL, 59 bytes SBCS
{⊖⍉↑(-N)↑¨(L/⍨1,2≤/L←A⍸⍵)↓¨(N←⎕D⍳⍵~A←'abc')↑¨⊂'XXXOOoo...'}

Try it on online!
Shorter than the other APL answers so far! I think it can probably be further golfed. Will add explanation soon!
Thanks to dzaima & hyper-neutrino for their advice in the The APL Orchard!

I have the feeling this can be further golfed. Any ideas?

can change 1+⍎¨ → ⎕D⍳

@Razetime Wow, that's really clever. Thanks!!

…↓¨↑∘'XXXOOoo...'¨N←⎕D⍳⍵~A←'abc'}

APL (69 66)
' XXXOOoo...'[1+⌽⍉⌽↑{z×(z<' abc'⍳⍵)<(1+⍎⍺)≥z←⍳10}/↑2↑¨I⊂⍨⎕D∊⍨I←⌽⍞]

Examples:

      ' XXXOOoo...'[1+⌽⍉⌽↑{z×(z<' abc'⍳⍵)<(1+⍎⍺)≥z←⍳10}/↑2↑¨I⊂⍨⎕D∊⍨I←⌽⍞]
0804023324554233204080

 .                  .
 .                  .
 o                  o
 o        oo        o
 O O     OOOO     O O
 O O  OO OOOO OO  O O
 X X XXXXXXXXXXXX X X
 X X XXXXXXXXXXXX X X
XXXXXXXXXXXXXXXXXXXXXX

      ' XXXOOoo...'[1+⌽⍉⌽↑{z×(z<' abc'⍳⍵)<(1+⍎⍺)≥z←⍳10}/↑2↑¨I⊂⍨⎕D∊⍨I←⌽⍞]
011a2b3b5c9c9b5b3a2110
      ..
      ..
      ..
      oo
     oooo
     OOOO
    OOOOOO
   XXX  XXX
 XXX      XXX
XXX        XXX

I don't know APL very well, but are you sure you need the space at the beginning of the ' XXXOOoo...' string?

@friol: yes, it's used to fill up the "empty" space

Outgolfed!

Canvas, 35 33 bytes
±｛⌐╷≡？┤╵“`Fc|C！‟ｍ］ｃ96－ ×１１╋╋｝｝）⤢⇵

Try it here!

PHP, 131 114 bytes
for($b=10;$b--;print"
")foreach(str_split($argn)as$a)$c=strpos(' abc',$a)?:!print$a<$b|$b<$c?' ':'XXXOOoo...'[$b];

Try it online!
$ echo 2479742|php -nF land.php
   .
   .
  ...
  ooo
  ooo
 OOOOO
 OOOOO
XXXXXXX
XXXXXXX
XXXXXXX

$ echo 011a2b3b5c9c9b5b3a2110|php -nF land.php
      ..
      ..
      ..
      oo
     oooo
     OOOO
    OOOOOO
   XXX  XXX
 XXX      XXX
XXX        XXX

$ echo a2a0a0a4a0a06a0a0a4a0a0a2a0a0a4a0a06a0a0a4a0a0a2|php -nF land.php

      o           o
      o           o
   O  O  O     O  O  O
   O  O  O     O  O  O
X  X  X  X  X  X  X  X  X
X  X  X  X  X  X  X  X  X
      X           X

PowerShell, 127 bytes
$r=,''*10
$args|% t*y|%{if($_-in97..99){$b=$_-96}else{,' '*$b+'XXXOOoo...'[$b.."$_"]+,' '*(9-"$_")|%{$r[--$i]+=$_}
$b=$i=0}}
$r

Try it online!

Jelly, 33 bytes
~kµṪV‘R×ØaiⱮ0xƲ)Ṗz0Ṛị“XXXOOoo...

Try it online!
Full program returning a list of lines. If that isn't acceptable, +2 bytes.
Note the trailing space. Included my favourite:
.                 .
..               ..
...             ...
oooo           oooo
ooooo         ooooo
OOOOOO       OOOOOO
OOOOOOO     OOOOOOO
XXXXXXXX   XXXXXXXX
XXXXXXXXX XXXXXXXXX
XXXXXXXXXXXXXXXXXXX

How it works
~kµṪV‘R×ØaiⱮ0xƲ)Ṗz0Ṛị“XXXOOoo...  - Main link. Takes a string on the left
~                                 - Bitwise NOT. This maps digits d to ~d and non-digits to 0
 k                                - Partition the string after falsey values
                                     This groups the string as we want, with a trailing []
  µ            )                  - Over each element, either [L, x] or [x]:
   Ṫ                              -   Extract x, modifying the element
    V                             -   Evaluate as a digit
     ‘                            -   Increment
      R                           -   Create a range
              Ʋ                   -   Last 4 links as a monad f([L]) or f([]):
        ØaiⱮ                      -     Index in the alphabet
            0x                    -     Get that many zeros
                                       If the element was [x], this yields []
                                       If the element was [L, x], this returns 1, 2 or 3 zeros, depending on L
       ×                          -   Multiple elementwise, zeroing the first 1,2 or 3 elements in the range if L is in the element
                Ṗ                 - Remove the trailing [] element
                 z0               - Transpose, padding with zeros
                   Ṛ              - Reverse
                    ị“XXXOOoo...  - Index into "XXXOOoo... "

Perl 6, 93 bytes
{for 9...0 ->\n {say .subst(/(\D)?(.)/,{'XXXOOoo... '.comb[$1>=n>=ord($0//0)-96??n!!10]}):g}}

A block that takes in the string and prints to stdout.
Try it online!

Japt -R, 36 bytes
óÈ¦nÃ£ÒXÌ î"XXXOOoo..."hSpXÎnD)s9Ãz3

Try it
óÈ¦nÃ£ÒXÌ î"..."hSpXÎnD)s9Ãz3     :Implicit input of string
ó                                 :Partition at
 È                                :Characters that return true when passed through the following function
  ¦                               :  Test for inequality with
   n                              :  Convert to number
    Ã                             :End function
     £                            :Map each X
      Ò                           :  Bitwise increment
       XÌ                         :  Last character of X
          î                       :  Slice the following to that length
           "..."                  :    Literal string
                h                 :    Replace as many characters as necessary at the start of that string with
                 S                :      Space
                  p               :      Repeat
                   XÎ             :        First character of X
                     n            :        Convert from base
                      D           :        14
                       )          :      End repeat
                        s9        :      Slice off the first 9 characters
                          Ã       :End map
                           z3     :Rotate clockwise by 90 degrees 3 times
                                  :Implicit output, joined by newlines

05AB1E (legacy), 34 bytes
Rvy.ïi"XXXOOoo..."y>£ëðAykÝǝ])ζRí»

Uses the legacy version of 05AB1E to save 2 bytes, since ζ also works on strings instead of just lists of characters.
Try it online.
Explanation:
R                  # Reverse the (implicit) input-string
 v                 # Loop `y` over each character:
  y.ïi             #  If `y` is a digit:
      "XXXOOoo..." #   Push string "XXXOOoo..."
        y>£        #   And only leave the first `y`+1 characters as substring
     ë             #  Else (`y` is a letter):
       Ayk         #   Get the index of `y` in the lowercase alphabet
          Ý        #   Create a list in the range [0, alphabet-index]
      ð    ǝ       #   Replace in the string at the top of the stack the characters at
                   #   those indices with a space
 ]                 # Close the if-else statement and loop
  )                # Wrap all strings on the stack into a list
   ζ               # Zip/transpose; swapping rows/columns
    Rí             # Reverse this list, as well as each individual line
      »            # And join the strings by newlines
                   # (after which the result is output implicitly)

As for my favorite 'building', let's go with this tree. ;)
b2b3b4b5b6b7898b7b6b5b4b3b2

       .
      ...
     .....
    ooooooo
   ooooooooo
  OOOOOOOOOOO
 OOOOOOOOOOOOO
XXXXXXXXXXXXXXX
      XXX
      XXX

APL (Dyalog Extended), 67 bytes
{⊖⍉↑(((' '⍴⍨2⊃⊢),'XXXOOoo...'↑⍨1+⊃)∘⌽0,48|⎕UCS)¨'[abc]?\d'⎕S'\0'⊢⍵}

Try it online!
Longer than the other answer, but I'll try golfing it later. Proper explanation coming soon.

'[abc]?\d'⎕S'\0'⊢⍵ - Extract single digits or characters followed by digits
(((' '⍴⍨2⊃⊢),'XXXOOoo...'↑⍨1+⊃)∘⌽0,48|⎕UCS)¨ - Train to turn each digit or pair into a horizontal string
⊖⍉↑ - Turn it into a matrix, transpose to make it vertical, and flip it upside-down.

Further outgolfed!

@AviFS Nice approach!

Pip -l, 45 bytes
Z:R{sXtRAb:Ab%4\,c"XXXOOoo..."@b}MRaC KXL.CXD

Takes input as a command-line argument. Try it here! Or, here's a 46-byte equivalent in Pip Classic: Try it online!
Explanation
High-level:
  R{sXtRAb:Ab%4\,c"XXXOOoo..."@b}              Apply this function
                                 MR            to each match
                                    C KXL.CXD  of this regex
                                   a           in the input string
Z:                                             Transpose the result
                                               Autoprint as lines (-l flag)

The regex:
   XL       Lowercase letter            [a-z]
  K         Apply Kleene star           [a-z]*
C           Wrap in a capturing group   ([a-z]*)
       XD   Digit                       \d
      C     Wrap in a capturing group   (\d)
     .      Concatenate                 ([a-z]*)(\d)

The replacement function takes three arguments: a is the full match, b is the first capturing group (a letter or empty string), c is the second capturing group (a digit).
R{sXtRAb:Ab%4\,c"XXXOOoo..."@b}
  s                              Space character
   Xt                            repeated 10 times
         Ab                      ASCII code of the letter (nil if empty string)
           %4                    Mod 4 ("a"->1, "b"->2, "c"->3, ""->nil)
             \,c                 Inclusive range from that number to the digit
                                 (treats a left argument of nil as 0)
       b:                        Assign that value to b
     RA                          and replace those indices in the space string
                "XXXOOoo..."@b   with the equivalent indices in this string
R                                Reverse to put the "top" of the building at the left


text:
Mod 7 in Manufactoria
A simple Manufactoria challenge.  Compute the input modulo 7.  The input will be in big-endian binary (blue=1, red=0).  The output should be in the same format.
Test cases provided.  The smallest part count wins.
http://pleasingfungus.com/Manufactoria/?ctm=Mod7;Input:_binary_number_big_endian._Output:_that_binary_number_mod_7;bbb:|brrr:b|brrrr:br|bb:bb|bbrrb:brr|brrrrb:brb|bbrb:bbr;13;3;1;
(if the input mod 7 is 0, output nothing.)

"code-golf" in this case means "fewest parts"?

Since I haven't even solved the incrementation problem, I have no idea how to solve this. Manufactoria is fun.

@JanDvorak: yes.

@KeithRandall We never tagged [tag:code-golf] with manufactoria. We should either remove the tag here or add it to the other questions.

@Howard: I'd say add it (or [tag:fastest-code] or [tag:busy-beaver] or [tag:code-challenge] or whatever best describes the scoring), and let [tag:manufactoria] be a simple language tag.

The algorithm is quite straightforward: Compute the modulus using a state machine (the largest part with eight branches - one of the states is duplicated for logistical purposes), then encode and collect the results. Since almost every result contains a one digit, an extra compression step is employed to reduce the amount of parts.
Designed in yEd, then transcribed to Manufactoria.
Uses way too many conveyer belts, in my opinion.

58 43 parts

http://pleasingfungus.com/Manufactoria/?lvl=33&code=c16:9f0;q15:9f3;q14:9f3;q13:9f3;c12:9f3;c16:10f1;r15:10f3;r14:10f3;b13:10f3;q12:10f4;p11:10f4;c16:11f1;i15:11f7;q14:11f7;q13:11f7;q12:11f7;c11:11f2;r15:12f3;b14:12f3;c12:12f3;c15:13f0;c14:13f0;c13:13f0;r13:12f3;y10:3f3;c10:4f2;g10:5f1;q10:6f4;y11:3f0;q11:4f6;r11:5f3;p11:6f4;b11:7f1;i12:4f7;c12:5f3;q12:6f0;g12:2f3;c12:3f3;p13:4f6;y13:3f0;c13:5f0;c12:7f3;b12:8f3;&ctm=Mod7;Input:_binary_number_big_endian._Output:_that_binary_number_mod_7;bbb:|brrr:b|brrrr:br|bb:bb|bbrrb:brr|brrrrb:brb|bbrb:bbr;13;3;1;
Keith Randall's idea of first converting the input to unary was pretty good, so I stole it. ;-)  Conveniently, I'd just spent some time optimizing small binary-to-unary converters in Manufactoria, so just picked one of my almost-working solutions* from that challenge and combined it with a quickly optimized mod-7 counter.
This design is now at the point where just getting the robots from the top to the bottom is starting to require otherwise useless extra conveyors.  Any significant further parts reductions will probably come from redesigning the layout to be taller and narrower.
(* That challenge required a) the design to fit onto a 7×7 board, and b) the unary output to be in red markers.  If you look at the binary-to-unary converter part of the machine above, you'll note that, with one or two extra parts, it can easily satisfy either requirement, but alas, not both.)

Here's the previous 58-part version:

http://pleasingfungus.com/Manufactoria/?lvl=32&code=g12:2f3;q13:13f5;c14:13f0;c15:12f3;c9:6f2;c9:7f1;c9:8f1;c9:9f1;c10:4f3;c10:5f3;i10:6f5;c10:7f2;c10:9f0;b11:3f2;p11:4f1;c11:5f1;p11:6f2;p11:7f2;c11:8f3;p11:9f3;b11:10f2;c12:3f2;c12:4f2;c12:5f0;r12:6f3;c12:7f3;i12:8f1;i12:9f5;y12:10f3;c13:3f2;c13:4f3;i13:5f1;c13:6f3;c13:7f2;i13:8f0;c13:9f1;c14:3f3;c14:4f2;p14:5f5;c14:6f1;p14:7f6;p14:8f7;r14:9f3;c15:4f3;q15:5f0;c15:6f3;c15:7f3;i15:8f6;c15:9f3;q15:10f7;c15:11f3;r12:12f2;p13:12f7;b14:12f0;b14:11f3;b12:11f3;y14:10f3;y15:13f0;&ctm=Mod7;Input:_binary_number_big_endian._Output:_that_binary_number_mod_7;bbb:|brrr:b|brrrr:br|bb:bb|bbrrb:brr|brrrrb:brb|bbrb:bbr;13;3;1;
Like Jan Dvorak's solution, this is also based on a 7-state FSM.  I've labeled the gates corresponding to each state in the screenshot to make it easier to read.  The state machine itself, however, is really the easy part; the tricky part is generating the final output with a minimal number of gates.
One trick I found useful was the final copy loop that barrel-shifts everything written before the yellow marker to the end (while also stripping off the green marker): this allowed me to make use of the repetition in the high-order output bits by generating the outputs as:
0:  Y   ->
1: BY   ->   B
2:  YBR ->  BR
3:  YBB ->  BB
4: RYBR -> BRR
5: BYBR -> BRB
6: RYBB -> BBR

This lets me mostly combine the output paths for outputs 2, 4 and 5 (which all begin with BR) and 3 and 6 (which begin with BB).

I have found no flaw in your design. Good job on saving space.

Ps. Here's a nice test for state-machine based implementations like this: the number 8890 = BRRRBRBRBBBRBR should give the output 0, visiting every state twice (and state 0 once more at the end) and taking every possible state transition once.

60 parts
My solution is quite a bit different.  It converts binary to unary first, then does the mod 7.  I can't quite beat Ilmari.

You know, you probably could if you optimized that converter.

I actually had no idea what I'm doing but it works and I might be the winner (if only the test-cases would be proof enough). :D

EDIT:
Optimized it 2 times, a bit smaller now.(Removed rubbish)

Actually I don't know if it'll be working with bigger numbers (or different one than the test cases).

-1 only works for the test cases. If the number starts with 111, it will always be reported as being divisible by 7. This is simply not true.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Count digits in a string, check if there its a fibonnaci number

There's a question with a comment with some code thats far too long.
For a site that has counting fetish, this code just seems so wrong.
Solve this meta-riddle, and explain it with a rhyme.
Winner is the shortest code in a fortnights time.

The challenge:

Open a file as input.
Count and output the number of digits (0,1,...9) and non-digits (everything else).
If the number of digits and non-digits are consecutive fibonnacci numbers, with the number of digits is fibonnacci number f(n) and the number of non-digits is f(n-1)  the file is "valid", otherwise it is "Invalid"
Output this information as exactly as shown below.

Example 1:
Digits: 34 Nondigits: 21
Valid program

Example 2:
Digits: 33 Nondigits: 21
Invalid program

You may want to clarify the order of the consecutive Fibonacci numbers in Rule 3. It is currently a bit ambiguous and possibly opposite to the other question.

Also, your examples are contrary to each other: 34 & 21 should not be both valid and invalid. Probably a typo.

looks good now! :-)

I see you like my validator. Interesting how my code is forked 5 times...

@Quincunx Completely a duplicate! Sorry about that folks!

Ouch, that rule about explaining in rhyme; it hurt my brain more than any program I wrote here.

Ruby, 151
d=[0,0];$<.read.chars{|c|d[c>?/&&c<?:?0:1]+=1};puts"Digits: %d Nondigits: %d"%d
a=b=1;while b<d[0];b=a+a=b end;print ([b,a]==d)??V:"Inv","alid program"

Java - 334
import java.nio.*;public class a{public static void main(String[]i)throws Exception{String s=new String(Files.readAllBytes(Paths.get(i[0])));int l=s.replaceAll("\\d","").length(),L=s.length()-l,a=1,b=2,c,d=0;while(a<L){if(a==l&&b==L)d=1;c=b;b+=a;a=c;}System.out.printf("Digits: %s Nondigits: %s\n%salid Program",L,l,d==0?"Inv":"V");}}

Ungolfed:
import java.nio.file.*;

public class Testing {

    public static void main(String[] i) throws Exception {
        String s = new String(Files.readAllBytes(Paths.get(i[0])));
        int l = s.replaceAll("\\d", "").length(), L = s.length() - l, a = 1, b = 2, c, d = 0;
        while (a < L) {
            if (a == l && b == L) {
                d = 1;
            }
            c = b;
            b += a;
            a = c;
        }
        System.out.printf("Digits: %s Nondigits: %s\n%salid Program", L, l, d == 0 ? "Inv" : "V");
    }
}

Explanation:

Reads the input from the file
supplied by command line
Puts the contents in a String
oh no! I'm thinking of quines.
Regex swaps digits of that thing
for the one and only empty String.
Then by String#length() I find
the charcount nondigit, yes that kind.
From the length of the first String
I subtract the charcount nondigit thing
to find the char digits count.
Next I sweep it all under the rug
so I can say "Help I'm a bug!".
Then I retrieve it - please have patience.
Now the first terms of the Fibonacci sequence
used to find the rest of the numbers.
What to rhyme with? I'll just use "others".
And when small num is greater than non-digits
I know if it's true, so wait a minute.
Uses printf to format output.
"alid Program" at the start puts
"Inv" or "V" according to the answer
Before is the counts, not one thing fancier
Thank you for lis'ning to this tale
Of the program that validates according to your rules

Whew, it was hard to write that.
I decided to assume the input is from the command line, in the form of a String. Please correct me, because if I can simply take a File as input, I can shorten this by a few chars. Also, I'd like to know if a method is okay.

Bash, 244
f=`cat $1`&&d=`sed 's/[0-9]*//g' $1`&&echo Digits: ${#d} Nondigits: $[${#f}-${#d}]]
a=1&&b=1&&while [ $b -lt ${#d} ];do z=$b&&b=$[a+b]&&a=$z;done&&if [ $b -eq ${#d} -a $a -eq $[${#f}-${#d}] ];then echo Valid program;else echo Invalid program;fi

call using ./script filename.
I'm not particularly good with bash and I'm sure there are a few ways to get this smaller.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Draw the Olympic Games logo
Challenge
Draw the Olympic Games logo...

...as character (e.g. ASCII) art!
Sample Output
      * * *               * * *               * * *
  *           *       *           *       *           *
*               *   *               *   *               *
*               * * *               * * *               *
*           *   *   *   *       *   *   *   *           *
  *       *   *       *   *   *   *       *   *       *
      * * *               * * *               * * *
          *               *   *               *
            *           *       *           *
                * * *               * * *

Your art doesn't have to look exactly like mine, but it has to represent the Olympic rings well enough that it's recognizable.
Rules

The program must write the art to the console.
Shortest code (in bytes, any language) wins.
A solution that prints rings in their respective colors (or a close representation) will be awarded a minus-twenty-point bonus.

The winner will be chosen on February 23rd at the end of the 2014 Winter Olympics.

Winners

Gold: marinus - APL, 62 points

Silver: Ayiko - Perl 6, 75 points

Bronze: evuez - Python, 107 points

Popular choice: Danko Durbić - Commodore 64 BASIC

20 bonus points. Um, why would I want +20 to my score?

@Quincunx I assume -20  was meant

Hum, this is a trademark…

@moala I think this falls under fair use policy.

@NateKerkhofs ok, if you think that the IOC is ok to comply with solely the US copyright law, no problem for me.

Be aware : http://registration.olympic.org/en/faq/detail/id/25 IOC are ùùùùù. Do not mess with them, they are really strict on the use of there logo

AFAIK, countries willing to participate in the Olympic Games have to adjust their copyright law to the IOC ideas, not the other way round.

Add a rule to include the (tm) mark also.

I've changed the wording of the bonus rule to reflect that the "twenty-point bonus" is indeed not 20 points added to your score.

To the trademark issue, I believe that this falls under nominative use, but the final decision resides with the purview of the administration and the lawyers.

In color, it's evident that they are interlocking rings, not merely overlapping. Few of the entries so far have accounted for that.

Totally IANAL: ok to write the sofware which draws the O****ic Rgs, not ok to execute it.  :-)

Surely as no money is being made, this is not illegal.

Too bad it's ASCII. Would look great with Python+Turtle for example. ;_;

How big a bonus is there for making the rings overlap in the correct way?  Maybe 50?  The only one I spotted doing this right was http://codegolf.stackexchange.com/a/19218/14680.

er, s/is there/should there be/

@SamB The challenge has already been up for a week, I'd rather keep the rules as they are in terms of bonuses.

I'm voting to close this as too broad because of the rule "Your art doesn't have to look exactly like mine, but it has to represent the Olympic rings well enough that it's recognizable."

APL (82) (-20 = 62)
Edit: for a change, this program is simple enough that TryAPL will touch it, so you can run it there (just paste the line in).
Not sure if I can claim the 'color' bit, I'm representing them all differently though.
2/' ▓█░▓▒'[1+(13↑⍉n)⌈¯13↑⍉32↑¯26↑⌈1.1×11↓n←⍉c,0,2×c,0,2×c←(⍳2/10)∊⌈5+5×1 2∘○¨⍳1e4]

The APL console doesn't support color, so I used shaded block characters (assigning any kind of other ASCII art would be as simple as replacing the characters at the beginning of the string.)
They should look like unbroken circles (depending on your font.)
      2/' ▓█░▓▒'[1+(13↑⍉n)⌈¯13↑⍉32↑¯26↑⌈1.1×11↓n←⍉c,0,2×c,0,2×c←(⍳2/10)∊⌈5+5×1 2∘○¨⍳1e4]
    ▓▓▓▓▓▓▓▓▓▓▓▓          ████████████          ▓▓▓▓▓▓▓▓▓▓▓▓
  ▓▓            ▓▓      ██            ██      ▓▓            ▓▓
▓▓                ▓▓  ██                ██  ▓▓                ▓▓
▓▓            ░░░░░░░░░░░░          ▒▒▒▒▒▒▒▒▒▒▒▒              ▓▓
▓▓          ░░    ▓▓  ██  ░░      ▒▒    ██  ▓▓  ▒▒            ▓▓
▓▓        ░░      ▓▓  ██    ░░  ▒▒      ██  ▓▓    ▒▒          ▓▓
▓▓        ░░      ▓▓  ██    ░░  ▒▒      ██  ▓▓    ▒▒          ▓▓
▓▓        ░░      ▓▓  ██    ░░  ▒▒      ██  ▓▓    ▒▒          ▓▓
  ▓▓      ░░    ▓▓      ██  ░░  ▒▒    ██      ▓▓  ▒▒        ▓▓
    ▓▓▓▓▓▓░░▓▓▓▓          ██░░██▒▒████          ▓▓▒▒▓▓▓▓▓▓▓▓
          ░░                ░░  ▒▒                ▒▒
            ░░            ░░      ▒▒            ▒▒
              ░░░░░░░░░░░░          ▒▒▒▒▒▒▒▒▒▒▒▒

Or:
      2/' bByRg'[1+(13↑⍉n)⌈¯13↑⍉32↑¯26↑⌈1.1×11↓n←⍉c,0,2×c,0,2×c←(⍳2/10)∊⌈5+5×1 2∘○¨⍳1e4]
    bbbbbbbbbbbb          BBBBBBBBBBBB          RRRRRRRRRRRR
  bb            bb      BB            BB      RR            RR
bb                bb  BB                BB  RR                RR
bb            yyyyyyyyyyyy          gggggggggggg              RR
bb          yy    bb  BB  yy      gg    BB  RR  gg            RR
bb        yy      bb  BB    yy  gg      BB  RR    gg          RR
bb        yy      bb  BB    yy  gg      BB  RR    gg          RR
bb        yy      bb  BB    yy  gg      BB  RR    gg          RR
  bb      yy    bb      BB  yy  gg    BB      RR  gg        RR
    bbbbbbyybbbb          BByyBBggBBBB          RRggRRRRRRRR
          yy                yy  gg                gg
            yy            yy      gg            gg
              yyyyyyyyyyyy          gggggggggggg

Commodore 64 BASIC
Writing directly in the screen and color memory.

Output:

Here's how you do this with sprites.

That's fantastic. +1. Can we get a byte count?

Yay!  Don't forget to add an SYS 64738.

Remember that you can abbreviate commands and line numbers too on C64 BASIC if you want to golf.

This took me straight back to playing Epyx Summer Games.  Good times.

The only thing that bothers me about this answer is: How is this ascii art?

this is PETSCII-art

@Quincunx: Since PETSCII is also known as CBM ASCII, this might qualify. If you want a different character to be used for drawing (to make it look more like classic ASCII art), replacing 160 (inverted space) with 42 (asterisk) in line 100 should do the trick.

If you just make the bottom two rings start from the top at the same time as the others start from the bottom, it will draw them so they are actually interlocking.

HTML Fiddle - 48, 35, 33 characters (Thanks @Dom and @cnst!)
OOO
OO

Output:

You can save more chars using:
OOO
OO instead... (I think it needs to be a block though, hence the
)

As this is not console output, you are better of at the free-style olympics contest: http://codegolf.stackexchange.com/q/19050/15168

@DomHastings:  Good call!  Answer updated :)

Then why bother with div, can just use p instead!

@cnst Very nice!

Does this count as ASCII art?

@PygameNerd: It depends on your definition of "ASCII art":  Yes if your definition is "ASCII characters arranged to form a picture"; no if your definition is "ASCII characters in a fixed-width text editor to form a picture".  As for whether it is output to the console as CousinCocaine said, if the definition is "The control or monitoring unit of a computer, containing the keyboard or keys, switches, etc.", then the web browser output is part of the monitor and thus the console (though this is probably not what the OP intended).

It's good for a laugh, anyway ;-)

BASH in color - 271 - 20 = 251 – With entangled rings ;P
o='_4mGA  _0mGA  _1mG\n _4m/A \A _0m/A \\_1mA /A \\\n_4mD_3m---_0mD_2m---_1mD\n _4m\A_3m/_4m/A_0m\\_3m\\A_2m/_0m/A_1m\\_2m\A _1m/\n_4mG_3mD_0m---_2mD_1m---\n_3m   A\A /A _2m\A /_1m\n _3mA G  A_2mG\n';o=${o//D/|A   |};o=${o//A/    };o=${o//G/   ---};printf "${o//_/\\e[3}"

Result:

And the for fun of it one: 61 - 20 = 41.
x='_4mO_3m^_0m0_2m^_1mO\n_3m V _2mV\n';printf "${x//_/\\e[3}"

LZ77 version:
echo H4sIALOY5VIAA12QwRXAIAhD767ghQV8CnYbXYENOnw1YqX1xk8wQGz1UiJKKRFebLX8ARsIs7g0g/djN7CdRAYC7Pf6h+5RVR3foMdTMcqHWlS3jKr5RKO/g25doJdXZ+ii75CseU2zNkGzH6HYCPKhPGmA2Wh3+7mEDHMgb/2cUPYJH2gPhtZxAQAA|base64 -d|zcat

Not many answers so far get the alternating overlap of the rings right, so this is worth an upvote even if the score is a bit higher.

bash: !/\\e[3}": event not found :(

I think your bash version is valid -- nowhere in the OP does it specify the size of the graphic -- but you need to fix the "V" shape rings.  Maybe a tilde (~) for the bottom of the rings?

@AlterLagos: You might find update works?

@AmeliaBR: Yes, That one was more for the fun of it, and not that seriously meant. Tried with various. Perhaps this is more to the liking? x='54mO53m_50m052m_51mO\n53m U 52mU\n';printf "${x//5/\\e[3}" – (I'm a bit evil with the 5 here.) Or even this might be better, with overlap in mind: x='54mO53mA50m052mA51mO\n53m U 52mU\n';printf "${x//5/\\e[3}" – though it might look more messy then the others.

Yep, with _ worked, cool!

I try to compress it but it didn't work :( printf "\echo H4sIAEc+41IAA0VQyxXAIAhbhQV8qLhNufaoEzh8EYI9GUM+ir6PjEmlFFKD9YfNoS6/jMmkUBhSCByuEGzaB8g8LheC6ck0ZzIw4mTyzXdTZIudFGa+rR4R8w57szH6CS2SvTV7ezLNmRUq+w9TZjHCFx51t9CxhQ9LqFlHKAEAAA==|base64 -d|zcat`"`

@AlvinWong: Not sure how you made the input for gzip, but updated A with a couple of lines.

Looks more like a benzene than olympic circle :-)

Sinclair BASIC on the ZX Spectrum 48K (261 bytes)
BASIC listing:

Final result:

Program running and code measuring:

BASIC listing in text format:
5 INK VAL "7": CLS
10 LET a=VAL "42": LET b=VAL "131": LET c=VAL "40": CIRCLE INK SGN PI;a,b,c: CIRCLE INK PI-PI;a+a+a,b,c: CIRCLE INK VAL "2";VAL "210",b,c
20 LET a=VAL "84": LET b=VAL "87": CIRCLE INK VAL "6";a,b,c: CIRCLE INK VAL "4";a+a,b,c
30 FOR l=PI-PI TO VAL "21": FOR c=PI-PI TO VAL "31": IF ATTR (l,c)<>VAL "63" THEN PRINT INK VAL "8";AT l,c;"*"
40 NEXT c: NEXT l

TAP file with the program, suitable for emulators or real machine using DivIDE or DivMMC:
http://www.zxprojects.com/images/stories/draw_the_olympics_flag.tap

I like the asciification part :)

This is lovely!

The use of Z80 sprite graphic is simply genial!! PS subtract 20 points for colors.

It feels so dirty to generate regular art and then make ASCII art from it. :)

Could you include the source code in a copy-able form?

Done! You can use the text version, or feed the TAP file to an emulator or real machine. Your choice :)

So I didn't actually read properly, it's ASCII-art, so I guess this is invalid. Oops!

HTML 121 (141 - 20)

O O O
 O O

In Chrome:

PHP 103 (123 - 20)

<?=($f='O ${f}#000>O ${f}red>O
 ${f}#fa0>O ${f}#193>O";

You can get the colours a bit closer with no penalty: blue:#06f, yellow:#fa0, green:#193

As this is not console output, you are better of at the free-style olympics contest: http://codegolf.stackexchange.com/q/19050/15168

Ruby: 198 characters - 20 = 178
a=[*0..9].map{[' ']*35}
d=->c,x,y=0{11.times{|i|7.times{|j|a[y+j][x+i]="^[[3#{c}m#^[[0m"if[248,774,1025,1025,1025,774,248][j]&1<<<a.map{|r|r*''}*$/

(Note that ^[ are single characters.)
Sample run:

Mathematica - 185
c[x_, y_] :=
 Table[Boole[Abs[(i - x)^2 + (j - y)^2 - 16] < 4], {i, 0, 15}, {j, 0,
   30}]
MatrixForm@
 Replace[Blue c[5, 4] + Black c[5, 14] + Red c[5, 24] +
   Yellow c[9, 9] + Green c[9, 19], {0 -> "",
   c_ + _ | c_ :> Style["*", c]}, {2}]

Here is the ouput

Another version, based on rasterization of vector graphics
MatrixForm@
 Replace[ImageData@
   Rasterize[
    Graphics[{Blue, Circle[{4, 9}, 4], Black, Circle[{14, 9}, 4], Red,
       Circle[{24, 9}, 4], Yellow, Circle[{9, 4}, 4], Green,
      Circle[{19, 4}, 4]}], ImageSize -> {30, 15}], {c_ :>
    Style["*", RGBColor@c]}, {2}]

You get points for the prettiest output.

Nice work.  I posted my own version of your code.

PostScript, 203 (-20 = 183)
%!
/Courier findfont 12 scalefont setfont
/l { setrgbcolor translate 20 { 0 30 moveto (*) show 18 rotate } repeat } def
140 200 0 0 1 l 45 -30 1 1 0 l 45 30 0 0 0 l 45 -30 0 1 0 l 45 30 1 0 0 l
showpage

I maintain that this counts as "ASCII art", though it doesn't write to the console. Output:

This could be golfed a little more.

If this is ASCII art, it surely is the first I've seen using rotated asterisks.

I'm sure it won't be the last.

Windows Command Script - 112 percent bytes
%1%0 @echo. set
%2.= oooo
%2,=o    o
%1%.%%.%%.%&%1%,%%,%%,%&%1o  %.%%.%  o&%1%.%%.%%.%&%1   %,%%,%&%1   %.%%.%

And of course, the obligatory cheat'ish version - 4 bytes
%~n0

saved as:
@echo. oooo  oooo  oooo&echo.o    oo    oo    o&echo.o   oooo  oooo   o&echo. oooo  oooo  oooo&echo.   o    oo    o&echo.    oooo  oooo.cmd

we need more answers in BAT and CMD :)

Another attempt in Perl, 130 120
Thanks to manatwork for helping with this
for(qw(15005 40410 802a0 80a28 41414 15005 808 2a0)){$s=sprintf"%20b",hex;$s=~y/01/ #/;print$s.substr(reverse($s),1).$/}

Output:
   # # #         # # #         # # #
 #       #     #       #     #       #
#         # # #         # # #         #
#       # #   # #     # #   # #       #
 #     # #     # #   # #     # #     #
   # # #         # # #         # # #
        #       #     #       #
          # # #         # # #

You can spare: 4 character by using for instead of foreach; 2 characters by removing (…) round sprintf()'s arguments; 2 characters by removing hex's parameter; 1 character by using y/// instead of tr///; 1 character by removing the final ;.

@manatwork Thanks! I've never even heard of y/// before. Will go and look it up now.

Python: 157 140 138 133 122 107 characters
107
(thanks to manatwork)
for o in"jzd360 1zlpwci 3ydgr29 20pzv5u jzd360 149ytc b8n40".split():print bin(int(o,36))[2:].rjust(34,'0')

sample output:
0001001000000001001000000001001000
0100000010000100000010000100000010
1000000001001000000001001000000001
0100000110000110000110000110000010
0001001000000001001000000001001000
0000000100000010000100000010000000
0000000001001000000001001000000000

157
print'\n'.join(['{0:b}'.format(o).rjust(39,'0') for o in [45099909288,137984246274,275230249985,276241138945,137984246274,45099909288,1078001920,352343040]])

122
(just started this one, I will try to improve it)
h=lambda x:bin(int("15bb511iun9aqulod22j8d4 ho8skh  "[x::8],36))[2:].rjust(20)
for x in range(8):print h(x)+h(x)[::-1][1:]

with better output: 120 characters
for o in"jzd360 1zlpwci 3ydgr29 20pzv5u jzd360 149ytc b8n40".split():print bin(int(o,36))[2:].replace('0',' ').rjust(34)

sample output:
   1  1        1  1        1  1
 1      1    1      1    1      1
1        1  1        1  1        1
 1     11    11    11    11     1
   1  1        1  1        1  1
       1      1    1      1
         1  1        1  1

What about base 36? This has 140 characters: print'\n'.join(['{0:b}'.format(int(o,36)).rjust(39,'0')for o in"kpvbkq0 1re099tu 3ifszg1t 3iwiuayp 1re099tu kpvbkq0 httbls 5trxmo".split()]). Regarding the “better output” version, there you can spare rjust()'s second parameter. (And insert a “t” in this post's heading.)

I was looking for a better solution, yours look great!

Nice improvement with bin(). But why are you using str() around it? bin()'s return value is already str.

Shouldn't the 5th line be 010000010100000101000101000001010000010? The bottom two rings look a bit broken to me.

@manatwork indeed, didn't think about that!

@squeamishossifrage thanks, looks better now!

In the 146 character solution you can avoid the [ and ] of the list-comprehension inside str.join.

it's in fact even shorter without the list-comprehension (just edited this solution)

Perl, 177 163
An improved version thanks to Dom Hastings:
$s=$"x3;print"  .-~-. "x3 .$/." /$s  \\"x3 .$/."|$s$s "x4 ."
 \\$s ./~\\.$s./~\\.$s /
  '-./'$s'\\-/'$s'\\.-'
"."$s |$s"x3 ."
$s "." \\$s  /"x2 ."
$s"."$s'-.-'"x2;

Output:
  .-~-.   .-~-.   .-~-.
 /     \ /     \ /     \
|       |       |       |
 \    ./~\.   ./~\.    /
  '-./'   '\-/'   '\.-'
    |       |       |
     \     / \     /
      '-.-'   '-.-'

Hooray for Perl! A couple of extra savings: instead of using "\n" as $r, you can use $/ which defaults to "\n", literal newlines might even save you more in a couple of places. You can also save 1 more char using $s=$"x3 rather than $s="   ". Hope that helps!

C, 257 bytes
#include <stdio.h>
d(i,j){int r=35;float x=r,y=0;while(--r>0){char s[8]={29,(((int)y+j)/32)+32,(((int)y+j)%32)+96,(((int)x+i)/32)+32,(((int)x+i)%32)+64,31,'.',0};puts(s);x-=0.2*y;y+=0.2*x;}}main(){d(140,200);d(185,170);d(230,200);d(275,170);d(320,200);}

This could have been golfed a bit more.
This has to be run on a Tektronix 4010 (or an emulator such as xterm -t). Output:

This is indeed ASCII art, since those are all '.' characters. And it does output to the console, as requested. Some Tektronix emulators support colour. Mine didn't, so I couldn't do that.

Haskell, 200
main=mapM(putStrLn.map(\b->if b then '#' else ' '))$(map.map)(\(x,y)->or$map(\(n,m)->(<2).abs.(18-)$sqrt$(n-x)^2+(m-y*2)^2)$[(20,20),(60,20),(100,20),(40,40),(80,40)])$map(zip[0..120].repeat)[0..30]

Output:
            #################                       #################                       #################
         ########### ###########                 ########### ###########                 ########### ###########
      #######               #######           #######               #######           #######               #######
     #####                     #####         #####                     #####         #####                     #####
   #####                         #####     #####                         #####     #####                         #####
  #####                           #####   #####                           #####   #####                           #####
 #####                             ##### #####                             ##### #####                             #####
 ####                               #### ####                               #### ####                               ####
 ####                               #### ####                               #### ####                               ####
 ###                                 ### ###                                 ### ###                                 ###
 ####                           #################                       #################                           ####
 ####                        ########### ###########                 ########### ###########                        ####
 #####                    #######  ##### #####  #######           #######  ##### #####  #######                    #####
  #####                  #####    #####   #####    #####         #####    #####   #####    #####                  #####
   #####               #####     #####     #####     #####     #####     #####     #####     #####               #####
     #####            #####    #####         #####    #####   #####    #####         #####    #####            #####
      #######        #####  #######           #######  ##### #####  #######           #######  #####        #######
         ########### ###########                 ########### ###########                 ########### ###########
            #################                       #################                       #################
                     ###                                 ### ###                                 ###
                     ####                               #### ####                               ####
                     ####                               #### ####                               ####
                     #####                             ##### #####                             #####
                      #####                           #####   #####                           #####
                       #####                         #####     #####                         #####
                         #####                     #####         #####                     #####
                          #######               #######           #######               #######
                             ########### ###########                 ########### ###########
                                #################                       #################

golfed out of:
{-# LANGUAGE NoMonomorphismRestriction #-}

olympMids = [(1,1),(3,1),(5,1),(2,2),(4,2)]
circleRadius = 0.9
circleBorder = 0.1
scaleFactor = 20
verticalScale = 0.5

distance :: Floating a => (a,a) -> (a,a) -> a
distance (x,y) (x2,y2) = sqrt $ (x2-x)^2 + (y2-y)^2

match :: (Floating a, Ord a) => (a,a) -> (a,a) -> Bool
match v v2 = (<circleBorder) . abs . (circleRadius-) $ distance v v2

matchOlymp :: (Floating a, Ord a) => (a,a) -> Bool
matchOlymp v = or $ map (match $ scale v) $ olympMids
  where
    scale (x,y) = (x / scaleFactor, y / scaleFactor / verticalScale)

board :: (Enum a, Num a) => a -> a -> [[(a, a)]]
board lx ly = map (zip [0..lx] . repeat) [0..ly]

printOlymp = mapM (putStrLn . map to) $ (map.map) matchOlymp $ board 120 30

main = printOlymp

to :: Bool -> Char
to True = '#'
to False = ' '

i still laugh about the map.map because it sounds funny. :D

It seems kind of bloated ...

the rings or the code?

I mean the rings :-)

Java, 181 179 161 156 bytes
enum M{M;{System.out.print(new java.math.BigInteger("2b13bp4vx9rreb1742o0tvtpxntx0mgsfw48c4cf",36).toString(2).replaceAll(".{29}","$0\n"));System.exit(1);}}

(Won't compile on jdk 1.7, requires 1.6 or lower)
The output:
11100011111110001111111000111
10111110111011111011101111101
01111111000111111100011111110
10111100111001110011100111101
11100011111110001111111000111
11111101111101110111110111111
11111111000111111100011111111

Definitely not a winner, but come on, it's java.

Spare 2 characters by not capturing in replaceAll()'s regular expression and putting back the entire matched part: replaceAll(".{29}","$0\n"). (There may be an extra line break at the end of your file, as I count only 181 characters in the posted code.)

One more thing: remove the import and put the package name directly in the constructor call. That reduces the size to 161 characters.

Spared another 5 bytes by changing class M{static{... to enum M{M;{.... Next big step is getting rid of BigInteger, is that possible? I'm trying to do some magic with String.format but have no results yet.

Ruby, 9
p"\044"*5

#satire
The rules allow for art that does not look exactly like the example, but it must "represent the Olympic rings well enough that it's recognizable".
You may recognize this representation of the Olympic Games logo.

Funny :) As a Chicagoan, I can tell you that's exactly what the mayor saw when he was courting the games !

As a Vancouverite (2010 Games), I can also relate. :-)

I feel like I'm missing out on an inside joke here :-P

@DoorknobofSnow Try this much more verbose Javascript version in your console: o=['\044']; o2=o.concat(o); "\t" + o2.concat(o).join(" ") + "\n\t " + o2.join(" ");

@AmeliaBR That does basically the same thing... how does that help explain anything?

@DoorknobofSnow Sorry, I though you were getting confused about character codes.  If you don't get the connection between Olympics and dollar signs, I can't help you there.

output is: $$$$$

Just tried in on http://repl.it/languages/Ruby ... got the output: "$$$$$" => nil

Javascript - 170 185 189 Chars
'jzd36071zlpwci73ydgr29720pzv5u7jzd3607149ytc7b8n40'.split(7).map(function(x){a=parseInt(x,36).toString(2);console.log((Array(35-a.length).join(0)+a).replace(/0/g,' '))})

Output:
   1  1        1  1        1  1
 1      1    1      1    1      1
1        1  1        1  1        1
 1     11    11    11    11     1
   1  1        1  1        1  1
       1      1    1      1
         1  1        1  1

2nd Javascript - 25 Chars
console.log('O O O\n O O')

Output:
O O O
 O O

The second is lazy

You can spare; 2 characters by using “4” as separator instead of “.” and using digit 4 (without quotes) as split()'s parameter; 2 characters by removing the last 2 ;s.

A (currently) Firefox-only version of the above can be reduced even more, to 172 characters: 'kpvbkq041re099tu43ifszg1t43iwiuayp41sdk52824kpvbkq04httbls45trxmo'.split(4).map(x=>{a=parseInt(x,36).toString(2);console.log(' '.repeat(39-a.length)+a.replace(/0/g,' '))}).

Thanks, added your suggestion, I will leave it browser independent for now.

◯ is not ascii...

@njzk2 Yup, solved it סּ_סּ

http://codegolf.stackexchange.com/a/19134/2972 :-D

@Blazemonger Beats me :)

Binary! (265 CHARS)
0001111100000000111110000000011111000
0100000001000010000000100001000000010
1000000001111100000000011111000000001
0100000011000011000001100001100000010
0001111100000000111110000000011111000
0000000010000001000001000000100000000
0000000001111100000000011111000000000

It is too large to win, but at least it looks cool!

Olympic logo in the Matrix.

@user13107 What?

PHP - 99 (-20?)
 bbbb  ####  rrrr
b    b#    #r    r
b   ybyy  g#gg   r
 bbyb  ##g#  rrrr
   y    yg    g
    yyyy  gggg

That is definitely recognizable. I say that my "colors" count; it's a close representation.
If you don't like that, then here is
GolfScript - 101 (-20?)
' bbbb  ####  rrrr
b    b#    #r    r
b   ybyy  g#gg   r
 bbyb  ##g#  rrrr
   y    yg    g
    yyyy  gggg'

Where's the code?

@Undo That is the code ;-)

In truth, I don't know PHP. That is the only PHP program/style I know how to write. (Sure I've gone through a tutorial, but I forgot it).

Wouldn't the PHP one come out as bbbb  ####  rrrr
b    b#    #r    r
b   ybyy  g#gg   r
bbyb  ##g#  rrrr
y    yg    g
yyyy  gggg on the screen?

@MrLister Nope: http://ideone.com/q2P0lX

@MrLister Okay, try adding a carriage return at the ends of the lines.

You need to add header("Content-Type: text/plain"), the default for web servers is text/html

-1 for using the code as the string literal

Bash + ImageMagick: 163 characters
e=ellipse
c=,10,5,0,360
convert -size 70x20 xc:black +antialias -stroke white -fill none -draw "$e 10,5$c$e 34,5$c$e 58,5$c$e 22,10$c$e 46,10$c" xpm:-|tr -dc ' .
'

Sample output:
.

     ...........             ...........             ...........
   ....       ....         ....       ....         ....       ....
 ...             ...     ...             ...     ...             ...
..                 ..   ..                 ..   ..                 ..
..                 ..   ..                 ..   ..                 ..
.                ...........             ...........                .
..             ......   ......         ......   ......             ..
..           ...   ..   ..   ...     ...   ..   ..   ...           ..
 ...        ..   ...     ...   ..   ..   ...     ...   ..        ...
   ....     ......         ......   ......         ......     ....
     ...........             ...........             ...........
            ..                 ..   ..                 ..
            ..                 ..   ..                 ..
             ...             ...     ...             ...
               ....       ....         ....       ....
                 ...........             ...........

Perl 6:  112 77 56 characters, 75 bytes
say flip .ord.base(2).trans("01"=>" @")for"䔐㣠".comb

Unicde strings! (above string is "\x1C71C\x228A2\x438E1\x26DB2\x1C71C\x4510\x38E0")
.comb gives a List of the separate characters in a String (without argument anyway)
.ord gives character code number from character
.base(2) returns a string with base-2 encoding of that Int
.trans replaces the digits with space and @ for better visibility
flip reverses the characters of a string so that missing leading 0's don't mess up the drawing.

  @@@   @@@   @@@
 @   @ @   @ @   @
@    @@@   @@@    @
 @  @@ @@ @@ @@  @
  @@@   @@@   @@@
    @   @ @   @
     @@@   @@@

edit2: newer solution using qwote words and base-36 encoded
say flip :36($_).base(2).trans("01"=>" @")for<2HWC 315U 5XI9 3ESY 2HWC DN4 B8G>

<ABC DEF GHI> is a quote-words syntax in perl6, so you get a list of Strings
:36($_) creates an Int from a base-36 encoded string in $_ (for loop default variable)

edit: old solution has nicer (copied) drawing but is longer:
  say flip :36($_).base(2).trans("01"=>" o")for<KPVBKQ0 1RE099TU 3IFSZG1T 3IWIUAYP 1SDK5282 KPVBKQ0 HTTBLS 5TRXMO>

   o o o         o o o         o o o
 o       o     o       o     o       o
o         o o o         o o o         o
o       o o   o o     o o   o o       o
 o     o o     o o   o o     o o     o
   o o o         o o o         o o o
        o       o     o       o
          o o o         o o o

Mathematica 185 175
10 bytes saved by mathe.
The rings below are ASCII 'O's.
The letter "O", slightly translucent, in Century Gothic, printed 5 times at font size=145 printer points.
This is not terminal art. However it fully satisfies Wikipedia's definition of Ascii art: http://en.wikipedia.org/wiki/ASCII_art.
Graphics[{Opacity@.8,Style["O",#]~Text~#2&@@@{{Blue,{-1.5,1}},{Black,{0,1}},{Red,{1.5,1}},{Orange,{-.8,.4}},{Darker@Green,{.8,.4}}}},BaseStyle->{145,FontFamily->"Century Gothic"}]

As this is not console output, you are better of at the free-style olympics contest: http://codegolf.stackexchange.com/q/19050/15168

FontSize ->  can be removed.

@mathe, True. I used the font size merely to make the output a reasonable size.

@DavidC I mean you could replace FontSize -> 145 by 145.

@mathe.  Yes!  Thanks.

JavaScript: 153 chars
I wanted to see if I could do it any faster using algebra to actually graph the circles:
s="";c=[3,7,11,7,19,7,7,4,15,4];for(y=10;y>0;y--){s+="\n";for(x=0;x<23;x+=.5){t=1;for(i=0;i<9;i+=2){a=x-c[i];b=y-c[i+1];d=a*a+b*b-9;t&=(d<0?-d:d)>3}s+=t}}

(c is an array of five (x,y) pairs, the centers of the circles, flattened to save ten characters.)
output:
1110000000111111111000000011111111100000001111
1000111110001111100011111000111110001111100011
0011111111100111001111111110011100111111111001
0011111111100000001111111110000000111111111001
0011111110000111000011111000011100001111111001
1000111100001111100001110000111110000111100011
1110000000111111111000000011111111100000001111
1111111100111111111001110011111111100111111111
1111111110001111100011111000111110001111111111
1111111111100000001111111110000000111111111111

159 chars is a little more readable:
s="";c=[3,7,11,7,19,7,7,4,15,4];for(y=10;y>0;y--){s+="\n";for(x=0;x<23;x+=.5){t=1;for(i=0;i<9;i+=2){a=x-c[i];b=y-c[i+1];d=a*a+b*b-9;t&=(d<0?-d:d)>3}s+=t?" ":t}}

output:
   0000000         0000000         0000000
 000     000     000     000     000     000
00         00   00         00   00         00
00         0000000         0000000         00
00       0000   0000     0000   0000       00
 000    0000     0000   0000     0000    000
   0000000         0000000         0000000
        00         00   00         00
         000     000     000     000
           0000000         0000000

In 167 chars we have "colors":
s="";c=[3,7,11,7,19,7,7,4,15,4];for(y=10;y>0;y--){s+="\n";for(x=0;x<23;x+=.5){t=1;for(i=0;i<9;i+=2){a=x-c[i];b=y-c[i+1];d=a*a+b*b-9;t&=(d<0?-d:d)>3;h=t?i:h}s+=t?" ":h}}

output:
   8888888         0000000         2222222
 888     888     000     000     222     222
88         88   00         00   22         22
88         8844400         0066622         22
88       4444   0044     6600   2266       22
 888    4444     0004   6000     2226    222
   8888888         0000000         2222222
        44         44   66         66
         444     444     666     666
           4444444         6666666

And with 189 chars, I can make the radius r adjustable as well:
r=5;s="";c=[r,0,2*r+1,r,3*r+2,0,4*r+3,r,5*r+4,0];for(y=-r;y<3*r;y++){s+="\n";for(x=0;x<9*r;x+=.5){t=1;for(i=0;i<9;i+=2){a=x-c[i];b=y-c[i+1];d=a*a+b*b-r*r;t&=(d<0?-d:d)>r;h=t?i:h}s+=t?" ":h}}

http://jsfiddle.net/mblase75/5Q6BX/

APL, 8 chars/bytes*
Here's an answer pushing for lowest char count (this is code golf after all)
2 5⍴'○ '

Output:
○ ○ ○
 ○ ○

The symbol is ○, APL circle operator. You can put an 'O' instead, in case you want strictly ASCII output. I just thought it fit to use an APL symbol.

Just for kicks, here's a color version (37 chars - 20 = 17 score)
2 20⍴'m',⍨¯2↓3↓∈(⊂'m○ ^[[3'),⍪'40132 '
                      ‾‾ ← single Esc character, type Ctrl+V Esc on the terminal

Output:

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
*: APL can be written in its own (legacy) single-byte charset that maps APL symbols to the upper 128 byte values. Therefore, for the purpose of scoring, a program of N chars that only uses ASCII characters and APL symbols can be considered to be N bytes long.

CSS, 1176 922 855 771 bytes, -20 colour bonus = 751
html,head,title,body{display:block; color:transparent; font:bold 1em/1 monospace; height:0}
link,meta,style{display:none}
:before,:after{float:left; color:#000; white-space:pre;
content:'   @@@@@@@\A  @@@     @@@\A@@         @@ \A            @@\A@@         @@\A@@         @@\A  @@@     @@@\A    @@@@  @'}
html:before{color:blue}
title:before,title:after{color:blue; position:absolute; left:0; top:3em; content:'@@'}
title:after{color:red; top:7em; content:'                                   @@'}
head:after{color:red}
body:before{clear:left; content:'     '}
body:after,html:after{position:relative; top:-5em; color:#EC0;
content:'    @  @@@@\A   @@@     @@@\A  @@         @@\A  @@         @@\A  @@\A  @@         @@\A   @@@     @@@\A     @@@@@@@'}
html:after{color:#090}

CSS only, no markup needed. See markupless fiddle here: http://jsfiddle.net/XcBMV/12/

In colour, and with the correct overlap.

Perl - 12 characters
say"OOO\nOO"

OK, so it's not an especially artistic rendering. ;-)
Slightly cuter:
perl -MTerm::ANSIColor=:constants -E'say ON_BRIGHT_WHITE,BLUE,O,BLACK,O,RED,O,$/,YELLOW,O,GREEN,O,RESET'

GAS Assembly 16-bit BIOS OL loader – 617 - 20 = 597
Going crazy on length here, so mere for the fun of it.

It does not load much, but it loads The Olympic Games logo as ASCII with colors ;)
Code:
.code16;S:jmp o;nop;o:mov $1984,%ax;mov %ax,%ds;mov %ax,%es;movw $t,%si;r:lodsb;or %al,%al;jz q;cmp $33,%al;jg k;movb $0,c;call X;inc %dh;mov $0,%dl;call G;jmp r;k:sub $48,%al;mov %al,%cl;add %al,c;lodsb;cmp $32,%al;je v;mov %al,%bl;and $15,%bl;mov $35,%al;v:mov $9,%ah;mov $0,%bh;mov $0,%ch;int $16;call X;mov c,%dl;call G;jmp r;q:ret;G:mov $2,%ah;int $16;X:mov $3,%ah;mov $0,%bh;int $16;ret;c:.byte 0;t:.asciz "3 5A9 5H9 5D!1 1A7 1A5 1H7 1H5 1D7 1D!1A9 1A4N9 1H4B9 1D!1A7 1N1 1A3 1H1 1N5 1B1 1H3 1D1 1B7 1D!1 1A5 1N1 1A5 1H1 1N3 1B1 1H5 1D1 1B5 1D!3 4A1N9 4H1B9 5D!8 1N7 1N5 1B7 1B!9 1 5N9 5B!";.=S+510;.word 0xaa55

(Linux) Build and extract MBR image
as -o olymp.o olymp.S
objcopy -O binary olymp.o olymp.img

Running in emulator
(Have not tested it on my home computer yet ...)
qemu-system-i386 olymp.img

Result

You sure take the idea of not using external resources to an extreme, don't you? +1

@AdamMaras: Yes, and there's that ;), had to try. Next is to incorporate a real load of OS. O`Loader II.

How does it score if you measure the binary, assuming that the disk already had a boot sector so you can skip the 55h AAh at the end (along with any associated padding)?

@SamB: That would be 275 bytes, 255 pt where the code part is about 91 bytes and the variable + plot data 184 bytes.

TI-Basic (16 bytes)
Note: TI-Basic is tokenized. If I remember correctly, ClrHome and Disp are one-byte tokens.
ClrHome
Disp "O O O"," O O

Python (318-20)
def f(s,i,j,c):
    for (k,l) in zip([i,i,i+1,i+1,i+2,i+2,i+3,i+3,i+4,i+4,i+5,i+5],[j+2,i+3,j+1,j+4,j,j+5,j,j+5,j+1,j+4,j+2,j+3]):s[k][l]=c+'+'+'\033[0m'
a=[];
for i in range(9):a+=[14*[' ']]
for i in [0,4,8]:f(a,0,i,'\033[9%im'%((4*i+4)%5))
for i in [2,6]:f(a,3,i, '\033[9%im'%((i+1)%5))
for l in a:print''.join(l)

a is a matrix of strings, the function f modifies it by drawing a circle at location i,j with color c using ansi color codes. Finally a is printed.

#include<iostream.h>
#include<conio.h>
#define tc textcolor

void circle(int x,int y,int k)
{
  tc(k);
  int n;
  for(n=0;n<=6;n++)
  {

    if(n==0||n==6)
    {
      gotoxy(x+3,y+n);
      cprintf("* * *");
    }
    else if(n==1||n==5)
    {
      gotoxy(x+1,y+n);
      cprintf("*");
      gotoxy(x+9,y+n);
      cprintf("*");
    }
    else if(n>1&&n<5)
    {
      gotoxy(x,y+n);
      cprintf("*");
      gotoxy(x+10,y+n);
      cprintf("*");
    }
  }
}

void main()
{
  clrscr();
  circle(1,1,BLUE);
  circle(14,1,WHITE);
  circle(27,1,RED);
  circle(8,4,YELLOW);
  circle(21,4,GREEN);
  _setcursortype(0);
  getch();
}

Please use Markdown to mark code block and keep the posted code readable. 2) As this is a [tag:code-golf] challenge, please try to reduce the size of your code to the strictly necessary. 3) Please add a heading line to your answer (emphasized with some markup up to your preference (usually header 1 or bold)), specifying the used language, the length of the code and the earned score.

Python - 163 characters (thanks to manatwork!)
print("""  000     000     000
 0   0   0   0   0   0
0     000     000     0
 0   0   0   0   0   0
  000     000     000
     0   0   0   0
      000     000""")

Output:
  000     000     000
 0   0   0   0   0   0
0     000     000     0
 0   0   0   0   0   0
  000     000     000
     0   0   0   0
      000     000

Very simple...

Count it manually. 2) Use a text editor which displays text size or absolute character position. (Midnight Commander's built-in editor displays absolute positions too: move the cursor at the end of text and the absolute position will be equal with the size.) 3) Save it in a file and look at its size. Or if is already posted, Code Golf UserScript Enhancement Pack tells it.

I just used len()

len() said it was 170 characters...

MCEdit says 176. No idea what I miscalculated earlier.

Minecraft Editor...?

Midnight Commander's editor.

that makes much more sense...

Regarding your code, you can spare: 2 characters by changing for "…" to """…""" and using literal newlines instead of \n; 11 characters by removing trailing spaces from each line's end. http://pastebin.com/9wQmB2N1 (See RAW Paste Data – their syntax highlight seems to alter the code.)

Thinking again, that code is composed mostly by repeating two substrings. So you can use those two “Lego® bricks” to build up the logo: http://pastebin.com/9VfqULji

Coffeescript 123
Input:
for t in[y=124830,137313,146673,y,17160,15600]
 n=t.toString 2;k=31-n.length;n=0+n while k--;console.log n.replace /0/g,' '

Output:
   1111  1111  1111
  1    11    11    1
  1   1111  1111   1
   1111  1111  1111
     1    11    1
      1111  1111

Screenshot:

Javascript 136
Input:
r=[y=124830,137313,146673,y,17160,15600]
for(i in r){
n=r[i].toString(2)
k=31-n.length
while(k--)n=0+n
console.log(n.replace(/0/g,' '))}

R - 70
Using CRAN-R statistics. Unfortunately the output goes to X and not to the console. I resubmitted this answer to the Olympic Games Logo - Free Style Edition
Anyhow, here is the code:
l=c(1,9);plot(3:7,c(6,4,6,4,6),col=c(4,7,1,3,2),cex=10,ylim=l,xlim=l)

"The program must write the art to the console."

The challenge calls for ASCII art...

Indeed, this program does not write art to the console and is therefor obsolete for this contest.

C - 230 bytes
Not a winner, but draws in a non-intuitive way:
#include <stdio.h>
#include <math.h>
#define D(p,q) ((int)hypot(x-(p),y-(q))==8)
int main(){int y,x;for(y=0;y<29;y++){for(x=0;x<61;x++)putchar((D(10,10)||D(30,10)||D(50,10)||D(20,18)||D(40,18))?'*':' ');putchar('\n');}return 0;}

To compile, gcc -o ologo ologo.c -lm.
Output:
    *********           *********           *********
   **       **         **       **         **       **
  *           *       *           *       *           *
 *             *     *             *     *             *
**             **   **             **   **             **
*               *   *               *   *               *
*               *   *               *   *               *
*               *   *               *   *               *
*             *********           *********             *
*            ** *   * **         ** *   * **            *
*           *   *   *   *       *   *   *   *           *
*          *    *   *    *     *    *   *    *          *
**        **   **   **   **   **   **   **   **        **
 *        *    *     *    *   *    *     *    *        *
  *       *   *       *   *   *   *       *   *       *
   **     * **         ** *   * **         ** *     **
    *********           *********           *********
          *               *   *               *
          *               *   *               *
          *               *   *               *
          **             **   **             **
           *             *     *             *
            *           *       *           *
             **       **         **       **
              *********           *********

using PASCAL / DELPHI
program Project_olympic_rings;
{$APPTYPE CONSOLE}
{$R *.res}
uses
  System.SysUtils;
begin
    writeln(' O O O ' + #10 + '  O O ');
    readln;
end.

You can shorten that by removing lines 3, 4, 5, and 8 since they contribute nothing. You can also remove the string concatenation since string and char literals can be written adjacently. There's also a shorter way to write line breaks. In total: program O;{$APPTYPE CONSOLE}begin writeln('O O O'^M' O O')end. 62 characters

Or in plain Pascal, 34 characters: begin write('O O O'#10' O O') end.

PowerShell, 555 bytes
Certainly not the shortest, but it's PowerShell with real circle functions and some color!

cls
c 8 8 1
c 16 8 2
c 24 8 3
c 12 15 4
c 20 15 5
w 30 30 . 6
function global:c ([int]$x,[int]$y,[int]$n) {
foreach ($i in 1..360)
{
$t = [math]::pi * ($i / 180)
w ($x + 5 * [math]::cos($t)) ($y + 5 * [math]::sin($t)) * $n
}
}
function global:w ([int]$x,[int]$y,[string]$c,[int]$n) {
$p=$host.ui.rawui.cursorposition
$p.x=$x
$p.y=$y
$host.ui.rawui.cursorposition=$p
$h="green"
switch ($n){ 1 {$h = "blue" } 2 {$h = "black" } 3 {$h = "red" } 4 {$h = "yellow" } 5 {$h = "green" }}
write-host $c -f $h -nonewline
}

Nitpick: the rings aren't supposed to be linked to their neighbors to the left and right.

Great point, really shows how much I'm into sports. Is it bad etiquette to edit my answer?

Don't see why it would be.

LAZARUS / FREE PASCAL (with color support , unit CRT)
program P;
uses crt;
procedure R(c : Byte);
begin
  TextColor(c);
  write('O ');
end;
begin
  R(blue);
  R(white);
  R(red);
  writeln;
  write(' ');
  r(yellow);
  r(green);
end.

As this is a [tag:code-golf] challenge better reduce those 179 characters. For example to 115: http://pastebin.com/kuQM4TiN And please mention your code's length and score too in your answers header line.

HTML+CSS (222 ch)
First go at code golf so it's not golfed nearly enough but I hadn't spotted anyone using HTML+CSS yet so meh..
OOO
OO

Someone can probably golf it more. (size for example was just to make it look better!)
fiddle: http://jsfiddle.net/mikecmpbll/LtYCh/1/

Jquery 503 chars
good challenge!
since I'm a web developer, I used the tools that I use each day... html/jquery/js
check out my answer at jsfiddle.net
http://jsfiddle.net/rYcVV/5/
screenshot of rings attached...

code minified

var color=["#06f","#000","red","#fa0","#193"],lefty=[150,300,450,225,380],toppy=[50,50,50,100,100];for(var j=0;j<color.length;j++){for(var i=0;i<36;i++){$("#rings").append('*')}}for(var m=0;m<color.length;m++){for(var k=0;k<36;k++){$($("span.x"+m)[k]).css("transform","rotate("+(10*k)+"deg)")}};

Your jsFiddle has wrong setup. For Framework you picked “No Library (pure JS)” so the jQuery code not works. 2) jsFiddle or similar link is welcome, but optional. You have to post your code here. 3) Please add a heading line to your post and specify the used language there. (Maybe the required jQuery version too – the output I managed to get from your code is always uglier than your screenshot.) 4) As this is a [tag:code-golf] challenge, reduce your code to the bare minimum and include the code size in your post's heading.

corrected missing jquery library thanks.

Maybe you should mention that requires Chrome. The output is equally ugly in Explorer, Firefox and Opera.

wow, you're a bit of a hater aren't you? I just looked at that link with internet explorer 9 and it looked the same as in chrome. http://jsfiddle.net/rYcVV/1/ , firefox does not look very good tho.

Sorry if you felt any hate in my comment, but I really believe this is ugly: http://i.stack.imgur.com/WoVO9.png Taken in Explorer 11.

added hack for firefox http://jsfiddle.net/rYcVV/3/

Looks much better now.

made another change, I think it will work in IE11, but I don't have that browser right now. http://jsfiddle.net/rYcVV/5/

Yes, this version works fine in Explorer 11, while still displays correctly in Chrome, Firefox and Opera.

PHP, 90 bytes
This matches the sample output exactly.

The code is displayed in a screenshot as it contains control characters that I can't post on Stack Exchange. Here is a longer, equivalent version using character codes that I can post here:
<?echo gzinflate("SP\0\1-0D\58Åx¹\x14P\$´Ðhœb¼\\˜æ)(\x10%†M+‘NFÕª…†q‰Aµb*\"d\x08\\#Yáª€%Üð\4Š‚\2v-8‚_X§\0");

That is 109 bytes but the version in the screenshot using control characters is 90 bytes.

Instead of making a screenshot of your editor, paste in the code!

I took a screenshot because it contains control characters that wouldn't be visible here.

... Isn't it cheating to write the program in binary?

@SamB - It is well within the rules currently listed.

Mathematica, 132
Further golfing of swish's fine method:
x_~f~y_:=Boole[E<Norm@{#-x,#2-y}<4.3]&~Array~{13,30}

Grid@Replace[Hue/@{E,{0,0,0},0,π,.3}.f@@@{5|5,5|15,5|25,9|10,9|20},0->"",c_+_.:>Style["*",c]},{2}]

Bash / base64 / zcat, 125
$ base64 -d<<<H4sIAKc54FIAA1NQUFDQAkMEwMrnUoCLEaS5UHUrKODlcxG0G4dqLahZWjj4Ckiuxq0KxgKpJT4sUH2M3V+oclhpJDW47AIAX9PRBqIBAAA=|zcat
    * * *           * * *           * * *
  *       *       *       *       *       *
*           *   *           *   *           *
*           * * *           * * *           *
*         * *   * *       * *   * *         *
  *     * *       * *   * *       * *     *
    * * *           * * *           * * *
        *           *   *           *
          *       *       *       *
            * * *           * * *
$

TeX, 169
\color{blue}\put(0,2){\circle{5}}\color{black}\put(6,2){\circle{5}}\color{red}\put(12,2){\circle{5}}\color{yellow}\put(2,0){\circle{5}}\color{green}\put(9,0){\circle{5}}

Converting the resulting image to ASCII characters:
Java
public class Converter {
    public static String convertImage(BufferedImage img)  {
        BufferedImage image = img;

        char[] tones = new char[]{'*', '*', '*', '*', '*',  ' '};
        int tone = 0;

        StringBuilder stringBuilder = new StringBuilder();

        Color color;

        for (double y = 0; y < image.getHeight(); y++) {
            for (double x = 0; x < image.getWidth(); x++) {
                color = new Color(image.getRGB((int) x, (int) y));

                tone = (color.getRed() + color.getGreen() + color.getBlue()) / 3;
                tone = tone / (256 / tones.length - 1);

                while (tone > tones.length - 1) tone--;

                stringBuilder.append(tones[tone] + " ");
            }
            stringBuilder.append("\n");
        }
        return stringBuilder.toString();
    }

    public static void main(String args[ ]) {
        BufferedImage image = null;
        Writer writer;
        try {
            image = ImageIO.read(new File("C:\\OlympicRings.gif"));

            writer = new BufferedWriter(new FileWriter(new File("C:\\ascii-conversion.txt")));
            writer.append((convertImage(image)));
            writer.close();

        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}

it gives -
          * * * * * *                             * * * * * *                             * * * * * *
      * *             * *                     * *             * *                     * *             * *
    *                     *                 *                     *                 *                     *
  *                         *             *                         *             *                         *
  *                         *             *                         *             *                         *
*                             *         *                             *         *                             *
*                             *         *                             *         *                             *
*                             * * * * * * *                           * * * * * * *                           *
*                           * *         *   * *                     * *         *   * *                       *
*                         *   *         *       *                 *   *         *       *                     *
*                       *     *         *         *             *     *         *         *                   *
  *                     *   *             *       *             *   *             *       *                 *
  *                   *     *             *         *         *     *             *         *               *
    *                 *   *                 *       *         *   *                 *       *             *
      * *             * *                     * *   *         * *                     * *   *         * *
          * * * * * * *                           * * * * * * *                           * * * * * *
                      *                             *         *                             *
                      *                             *         *                             *
                        *                         *             *                         *
                        *                         *             *                         *
                          *                     *                 *                     *
                            * *             * *                     * *             * *
                                * * * * * *                             * * * * * *

Math
|f(x)|=sqrt(1-x^2)
f(x+2)
f(x-2)
f(x+1)-1
f(x-1)-1

For the output to be able to be graphed with a computer I had to add:
g(x)=-f(x)
g(x+2)
g(x-2)
g(x+1)-1
g(x-1)-1

And remove the |'s from the first line.
But they don't really have to be there.

C# [202]
Basic foreach loop in C#
class P{static void Main(){foreach(var i in new[]{0x3c7f1fc7,0x37ddf77d,0x2fe3f8fe,0x379ce73d,0x3c7f1fc7,0x3fbeefbf,0x3fe3f8ff})System.Console.WriteLine(System.Convert.ToString(i,2).Replace('1',' '));}}

Result Below
    000       000       000
  0     0   0     0   0     0
 0       000       000       0
  0    00   00   00   00    0
    000       000       000
       0     0   0     0
         000       000

Linq Version 215 Characters
namespace System.Linq{class P{static void Main(){new[]{0x3c7f1fc7,0x37ddf77d,0x2fe3f8fe,0x379ce73d,0x3c7f1fc7,0x3fbeefbf,0x3fe3f8ff}.ToList().ForEach(i=>Console.WriteLine(Convert.ToString(i,2).Replace('1',' ')));}}}

PROCESSING B/W (78 characters)
No output to the console but still fun to participate. Colours add a lot to the code so it is not worth the 20 points in this case.

float
  i,s=9,k=1;for(i=1;i<6;i++){k=i;if(i>3){s=13;k=i*1-2.5;}text("O",k*8,s);}

Colour (150-20=130 characters)

float
  r=0,g=0,b=255,i,s=9,k=1;for(i=1;i<6;i++){k=i;if(i>3){s=12;k=k-2.5;g=255;r=(5-i)*255;}if(i==3){r=255;}if(i==2){b=0;}fill(r,g,b);text("O",k*9,s);}

gnuplot 42 characters
se te du
uns bor
uns tic
p '-' w ell not
1 4
2 3
3 4
4 3
5 4
e

Output:
             **                       **                      **
       ******  ******           ******  ******          ******  ******
    ***              ***     ***              ***    ***              ***
  ***                  *** ***                  ******                  ***
  *                      * *                      **                      *
  *                      ***                      **                      **
  *                **************           **************                **
  *             ***      * *     ***     ***      **      ***             *
  ***         ***      *** ***     *** ***      ******      ***         ***
    ***       *      ***     ***     * *      ***    ***      *       ***
       **************           **************          **************
             **                      ***                      **
              *                      * *                      *
              ***                  *** ***                  ***
                ***              ***     ***              ***
                   **************           **************

Shorter version (with axes) 27 characters
se te du
p '-' w ell
1 4
2 3
3 4
4 3
5 4
e

Output:
  5.5 ++----------+----------+-----------+----------+-----------+---------++
      +           +          +           +          +           '-' ****** +
    5 ++                                                                  ++
      |     ************           ************           ************     |
      |  ***            ***     ***            ***     ***            ***  |
  4.5 +**                  ** **                  ** **                  **+
      **                    ***                    ***                    **
    4 *+                     *                      *                     +*
      *                ************           ************                 *
  3.5 **            ***     ***    ***     ***     ***    ***             **
      |**         **       ** **      ** **       ** **      **          **|
      |  ***     **     ***     ***    ***     ***     ***    **      ***  |
    3 ++    ************           ************           ************    ++
      |          *                      *                      *           |
  2.5 ++         **                    ***                    **          ++
      |           **                  ** **                  **            |
      |             ***            ***     ***            ***              |
    2 ++               ************           ************                ++
      +           +          +           +          +           +          +
  1.5 ++----------+----------+-----------+----------+-----------+---------++
      0           1          2           3          4           5          6

HTML + CSS ( 209 characters )
This isn't really much better than the other HTML / CSS attempt, but I wanted to try this for myself!  removing font size will again shrink down a teeny bit.
<e><e><e><e><e>

fiddle:
http://jsfiddle.net/rV4eQ/
it's not really kosher code, but the e seemed fun to use.

PERL, 15 characters
say"O O O
 O O"

To be invoked with -E.
O O O
 O O

TI-Basic (15 bytes)
This really ought to be a comment on @bb94 's answer, but I don't have the reputation for that yet.
ClrHome
Disp "O O O
" O O

I saved a byte by omitting a closing quote and using the fact that programs print the final line without being explicitly told to.  This also avoids the "Done" that would be printed otherwise.