girobuz
  • Member for 2 years, 3 months
  • Last seen more than a month ago
49 answers
25 votes
7k views
Hell0 W0rld! scored by ASCII values
3 votes

C (gcc), Score: 2021 Thanks to GammaFunction A(){puts("Hell0 W0rld!");} Also, just for fun, here is a C program that had a score of 1 using overflow. It's a base64 encoded rar file https://pastebin....

View answer
39 answers
33 votes
6k views
Round away from zero
3 votes

C, 94 43 39 bytes thanks to ceilingcat for 39 bytes #define f(n)(int)(n>0?ceil(n):floor(n)) TIO

View answer
14 answers
7 votes
2k views
Print out execution time of program
2 votes

C (gcc), 59 bytes main(c,a){a=clock();for(c=100;c--;);printf("%dus",clock()-a);} Try it online!

View answer
21 answers
20 votes
5k views
Largest monetary amount impossible to make with two types of coin
2 votes

C (gcc), 18 bytes f(a,b){a=~-a*b-a;} Noodle9's answer except using a= instead of return. Try it online!

View answer
5 answers
13 votes
595 views
Typing, but to the left
2 votes

C (gcc), 276 bytes i;j;k;h;l;m;n;o;f(char*b){char*c=calloc(m=strlen(b),1),*a=" \tqwertyuiop\aasdfghjkl\nzxcvbnm\tQWERTYUIOP\aASDFGHJKL\nZXCVBNM`1234567890";for(i=k=j=n=0;j<=m;l=a[i=index(a,b[j++])-...

View answer
35 answers
13 votes
2k views
Determine the Winner of a Game of Australian Football
2 votes

C (gcc), 39 35 31 26 bytes e(a,b,c,d){a=(a-c)*6>d-b;} 0 is false 1 is true Input to function is (g1, b1, g2, b2) Thanks to Doorknob for -5 bytes Try it online!

View answer
12 answers
18 votes
1k views
Are the beams above or below the notes?
1 votes

C (gcc), 118 115 109 bytes #define A a[p] p;s;q;r;f(a,t)int*a;{p=t;for(q=r=*a;p--;s+=(A>0)-(A<0))q=q>A?q:A,r=r<A?r:A;a=q+r+(s>0)<(s<0);} Uses Robin Ryder's method. Try it ...

View answer
26 answers
21 votes
3k views
An A , or An An?
1 votes

C (gcc), 225 207 202 201 bytes Thanks to ceilingcat for -24 bytes #define P strcpy(f+d,index("!?.",i[c-2])+!c? c;d;v(i,g,f)char*i,*g,*f;{for(d=0;i[c];c++,d++)strcmp("[?]",memcpy(g,i+c,3))?f[d]=i[c]:(...

View answer
111 answers
86 votes
11k views
N(e(s(t))) a string
1 votes

C (gcc), 97 84 bytes Thanks to ceilingcat for -13 bytes f(char*b){printf(*++b?"%c(":"%c",*b);*b&&f(b)+printf(")");}a[99];main(){f(gets(a));} Try it online!

View answer
13 answers
5 votes
455 views
Please Read Primes
1 votes

Python 3, 125 107 bytes 107 bytes thanks to Black Owl Kai i=input().split();j=k=1 for c in i: if j>1: while k>2: k-=1 if j%k<1:k=0 if k:print(c) j+=1;k=j Try it online! 120 ...

View answer
18 answers
20 votes
2k views
What's this constructed number's starter?
1 votes

Hy, 44 bytes (defn a[p](print(get(str(*(+(int p)1)9))0))) Uses Grimy's method Try it online!

View answer
11 answers
-5 votes
2k views
Return the nth element of an array even if its out of bound
1 votes

C (gcc), 53 32 31 bytes a(b,c,d)int*b;{b=b[(d%c+c)%c];} Thanks to wastl for 31 bytes Try it online!

View answer
28 answers
33 votes
3k views
Count rook moves 1D
1 votes

C, 183 156 151 137 96 91 bytes Thanks to ceilingcat for 91 bytes. c,e;char*z,b[9];main(d){for(gets(z=b);e=*z>81?c-=e*~!d,d=0:e+1,*++z;);printf("%i",d?:c+e);} R is a rook, everything else is a ...

View answer
21 answers
30 votes
6k views
Divide Numbers by 0
1 votes

C, 209 203 137 bytes -66 bytes thanks to ceilingcat char a[9];main(f){gets(a);f=strlen(a)-3;a[f+1]=0;printf((*a==55&a[1]==49&f==1?a[1]=98:*a==49&!f?*a=98:a[f]==98|*a==48&!f)?"%s":"%...

View answer
13 answers
16 votes
1k views
Quoting Big Brother
0 votes

C (gcc), 307 289 271 270 bytes -37 bytes thanks to ceilingcat *y=" IS ";main(){int*r[]={"WAR",y,"PEACE.\nFREEDOM",y,"SLAVERY.\nIGNORANCE",y,"STRENGTH.",0,"Under the spreading chestnut tree","\nI"," ...

View answer
19 answers
22 votes
2k views
Smallest Fibonacci Multiples
0 votes

C (gcc), 33 bytes, Score:34 Based off xibu's answer. int F(m,a,b){m=a%m?F(m,a+b,a):a;} Try it online!

View answer
23 answers
17 votes
3k views
Size Does Matter (at least referring to bottles)
0 votes

C (gcc), 79 74 77 bytes 78 if the dash in compile arg is ignored. Port of TField answer. Increase in bytes is to comply with rules. -5 bytes thanks to ceilingcat and bznein b;c;f(a){for(b=0;++b<...

View answer
18 answers
15 votes
2k views
Horizontally mirror a brainflak program
0 votes

C (gcc), 85 84 64 60 bytes 60 bytes thanks to Neil p;f(char*s){for(p=strlen(s);p--;)putchar(s[p]^68%s[p]/3%8);} Try it online!

View answer
15 answers
2 votes
435 views
type in a random mess of capital letters
0 votes

C (gcc), 109 46 bytes Thanks to Johan du Toit for -63 bytes f(char*s){for(;*s++-=(*s-97u<26&rand())*32;);} Try it online!

View answer
49 answers
36 votes
10k views
Open the browser to http://codegolf.stackexchange.com
0 votes

C (gcc), 49 38 37 bytes main(){system("start http:ppcg.ga");} It's for Windows.

View answer
44 answers
22 votes
3k views
Parallel resistance in electric circuits
0 votes

C (gcc), 65 62 bytes Thanks to ceilingcat for -3 bytes. float a(b,c)int*b;{float d=0;for(;c--;)d+=1./b[c];return 1/d;} Try it online!

View answer