Skip to content

Instantly share code, notes, and snippets.

@ilyakurdyukov
Created December 16, 2020 08:54
Show Gist options
  • Save ilyakurdyukov/0742bde6cc2e42306d34ac9d7dd8e1b3 to your computer and use it in GitHub Desktop.
Save ilyakurdyukov/0742bde6cc2e42306d34ac9d7dd8e1b3 to your computer and use it in GitHub Desktop.
Imagine that you apply for a job at Obfuscate Inc. and they ask you to write a simple program to prove your skills. How will you write it?
#include <stdio.h>
i,x=1,y, z= 1,a;main (){((a<1
)& (x >y )?
++ i- 2< 99
?a=x=i %3 ?i %5
?z *= i+ 1>
z? 10 :1 :4
:0 ,y =i%5?i%3 ?0:4:8,1
:0:1)? (x += (putchar ((a/=10)
|| x< y? y? x& 2?
61 *2 :x %2 *7 *5
+70+((x &4 )* (x %2
*4 -1 )) :( i/ a%
10 +3 %( a* x| 44
)*9+21) :10),1 )),main( ):x*10;}
@ilyakurdyukov
Copy link
Author

Also in the boring brick shape that I did first:

int main(){int i=0,x=1,
y=0,z=1,a=0;for(;a<1&&x
>y?i++<100?a=x=i%3?i%5?
z*=i>=z?10:1:4:0,y=i%5?
i%3?0:4:8,1:0:1;x++)a/=
10,putchar(a||x<y?y?x&2
?122:x%2*35+70+(x&4)*(x
%2*4-1):i/a%10+48:10);}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment