2011/07/21

My first Codegolf

Codegolf is a contest which make a source code as short as possible. I challenged two problems with C.

1.Hello world [Problem is here]
size:31,time:0.000181sec
Top programmer of this problem in C write 30-byte code. How does he or she?

2.Smileys Triangle [Problem is here]
size:95,time:0.000190sec

Top programmer of this problem in C write 58-byte code. I can't make my source such short.



1.Hello world
main(){puts("Hello, world!");}


2.Smileys Triangle
i;main(j){puts(":\n:-");for(i;i-64;i+=2,puts("")){printf(":-");for(j=-1;j<i;j++)putchar(41);}}

0 件のコメント:

コメントを投稿