Calculator Community > Community Contests

[ENDED] Code Golf Contest #10

(1/7) > >>

JWinslow23:
Ten is three, three is four, four is MAGIC. O.O

NEXT: Here
PREVIOUS: Here

Challenge 10

Problem
Create a program which displays the Olympic Rings, following these criteria:

* The rings may be a picture or ASCII art
* The rings must overlap (-40% if they interlock in the proper way!)
* The rings should be in color if at all possible (-50% if so)
* The program must not access an external source, Juju :P Deadline
September 22, 2014, 1:00 AM EST

If any further clarifica...you know what? Nobody ever reads this part! Whatever, I don't have a pun anyways. Not that anybody reads that, either. :(

Ruby
RankUserSizeDateCode1Juju220-70%=669/16/2014 8:35:42 AMSpoiler For Spoiler: puts"\x1b[2J"
def H(x,y);"\x1b["+x.to_s+";"+y.to_s+"H";end
def a(x,y,c);2.times{|i|puts"\x1b[3"+c.to_s+"m"+H(x+i+1,y)+"#"+H(x+i+1,y+5)+"#"+H(x+3*i,y+1)+"####"+"\x1b[0m"};end
a(1,1,4);a(1,7,0);a(1,13,1);a(3,4,3);a(3,10,2)
Golfscript
RankUserSizeDateCode1JWinslow2347-40%=28.29/15/2014 11:16:11 PMSpoiler For Spoiler: ' bb  ll  rr
b '' by  lg  rr'
.);n@'
   yy  gg'
CJam
RankUserSizeDateCode1JWinslow2347-40%=28.29/15/2014 11:16:11 PMSpoiler For Spoiler: " bb  ll  rr
b "" by  lg  rr"
_);N@"
   yy  gg"2pimathbrainiac54-40%=32.49/15/2014 7:11:40 PMSpoiler For Spoiler: " bb  ll  rr"N"b  by  lg  r"N" by  lg  rr"N"   yy  gg"
C
RankUserSizeDateCode1pimathbrainiac101-40%=60.69/15/2014 7:11:40 PMSpoiler For Spoiler: #include <stdio.h>
int main(){printf(" bb  ll  rr\nb  by  lg  r\n by  lg  rr\n   yy  gg");return 0;}
Nspire Lua
RankUserSizeDateCode1Jens_K94-70%=28.29/16/2014 7:18:56 AMSpoiler For Spoiler: function on.paint(g)
for i=0,4 do
g:setColorRGB(9E5*i)g:drawArc(9+i*5,9+i%2*5,9,9,205-i%2*90,i>0 and 330 or 360)end
end2LDStudios80-50%=409/18/2014 5:26:33 AMSpoiler For Spoiler: for i=1,5 do a=(i>3 and 5 or 0)gc:setColorRGB(i*42)gc:drawString(0,i*8-a*4,a)end3Adriweb84-50%=429/15/2014 11:38:14 PMSpoiler For Spoiler: function on.paint(g)for i=4,16,3 do g:setColorRGB(i^5)g:drawString(0,i,i%2*4)end end
Language Ranking
RankLangUserSizeDate1CJamJWinslow2328.29/15/2014 11:16:11 PM2GolfscriptJWinslow2328.29/15/2014 11:16:11 PM3Nspire LuaJens_K28.29/16/2014 7:18:56 AM4Cpimathbrainiac60.69/15/2014 7:11:40 PM5RubyJuju669/16/2014 8:35:42 AM

LDStudios:
Quick question, is it okay on a color calc, if i make the rings gray scale to save bytes? It doesn't seem fair for me to have to do full color when anyone on a grayscale calc doesn't have to.

496 bytes (but so pretty!):


161 bytes:

JWinslow23:
As long as the "colors" are all distinct, this is allowed.

pimathbrainiac:
54 bytes of CJam and 101 bytes of GNU C

TAKE THAT!!!

Juju:

--- Quote from: JWinslow23 on September 15, 2014, 06:50:58 pm ---
* The program must not access an external source, Juju :P
--- End quote ---
I didn't do that? o.o

Navigation

[0] Message Index

[#] Next page

Go to full version