pages:
- 1
- 2
ali.S SAYS
Yeah, so far I'm the best (after python guys)! who can beat me?
AMiR SAYS
81 characters :D
ali.S SAYS
80 let's see if you can beat this one!
ali.S SAYS
79 and I don't want any more arguement.
AMiR SAYS
ali.S said:
79 and I don't want any more arguement.
I've cast the spell! :D 76 characters!
ali.S SAYS
Seems I know better spells! Done in only 72
AMiR SAYS
ali.S said:
Seems I know better spells! Done in only 72
Wow! :D
Here is mine:
main(i, s){
for(s=8;
i=getchar(), s+i-18;
s=i-10?s+i-48:printf("%d\n",s%9+1)+6
);
}
ali.S SAYS
I don't think anyone will ever be able to get smaller than this, so here is my code (with all it's revisions)!
a;
main(c)
{
for(;c=getchar()+a-10;a=c-a?c-38:printf("%d\n",a%9?a%9:9)*0); /*fixed a bug happened at 021*/
// for(;c=getchar()+a-48;a=c-a+38?c:printf("%d\n",a%9?a%9:9)*0); /*72 char*/
// for(;c=getchar(),c+a-64;a=c<11?printf("%d\n",a%9?a%9:9),0:a+c+6); /*76 char*/
// for(;scanf("%c",&c),c+a-64;a=c<11?printf("%d\n",a%9?a%9:9),0:a+c+6); /*79 char*/
// for(;scanf("%c",&c),c+a-10;a=c<11?printf("%d\n",a%9?a%9:9),0:a+c-48); /*80 char*/
// for(;scanf("%c",&c),c>10?a+=c-48,1:a;c<11?printf("%d\n",a%9?a%9:9),a=0:0); /*85 char*/
}
Mahdi Dehghani SAYS
ali.S said:
I don't think anyone will ever be able to get smaller than this, so here is my code (with all it's revisions)!
a; main(c) { for(;c=getchar()+a-10;a=c-a?c-38:printf("%d\n",a%9?a%9:9)*0); /*fixed a bug happened at 021*/ // for(;c=getchar()+a-48;a=c-a+38?c:printf("%d\n",a%9?a%9:9)*0); /*72 char*/ // for(;c=getchar(),c+a-64;a=c<11?printf("%d\n",a%9?a%9:9),0:a+c+6); /*76 char*/ // for(;scanf("%c",&c),c+a-64;a=c<11?printf("%d\n",a%9?a%9:9),0:a+c+6); /*79 char*/ // for(;scanf("%c",&c),c+a-10;a=c<11?printf("%d\n",a%9?a%9:9),0:a+c-48); /*80 char*/ // for(;scanf("%c",&c),c>10?a+=c-48,1:a;c<11?printf("%d\n",a%9?a%9:9),a=0:0); /*85 char*/ }
Here is the new revision of your code (70 characters):
for(;c=getchar()+a-10;a=c-a?c-38:printf("%d\n",--a%9+1)*0);
Login please!
In order to post something you must login first. You can use the form in the top of this page.