Skip to main content
added 13 characters in body
Source Link
Steadybox
  • 16.5k
  • 5
  • 41
  • 84

C,  71  70 70  68 bytes

Thanks to @Mr. Xcoder for saving a bytethree bytes!

f(n){for(n=-1;++n<18;)printf("%d\n",((1<<n)-n)<<(n>0)!!n);puts("NOPE!");}

Try it online!Try it online!

C,  71  70 bytes

Thanks to @Mr. Xcoder for saving a byte!

f(n){for(n=-1;++n<18;)printf("%d\n",((1<<n)-n)<<(n>0));puts("NOPE!");}

Try it online!

C,  71   70  68 bytes

Thanks to @Mr. Xcoder for saving three bytes!

f(n){for(n=-1;++n<18;)printf("%d\n",((1<<n)-n)<<!!n);puts("NOPE!");}

Try it online!

added 57 characters in body
Source Link
Steadybox
  • 16.5k
  • 5
  • 41
  • 84

C, 71 71  70 bytes

Thanks to @Mr. Xcoder for saving a byte!

f(n){for(n=-1;++n<18;)printf("%d\n",((1<<n)-n)*2-<<(n<1n>0));puts("NOPE!");}

Try it online!Try it online!

C, 71 bytes

f(n){for(n=-1;++n<18;)printf("%d\n",((1<<n)-n)*2-(n<1));puts("NOPE!");}

Try it online!

C,  71  70 bytes

Thanks to @Mr. Xcoder for saving a byte!

f(n){for(n=-1;++n<18;)printf("%d\n",((1<<n)-n)<<(n>0));puts("NOPE!");}

Try it online!

Source Link
Steadybox
  • 16.5k
  • 5
  • 41
  • 84

C, 71 bytes

f(n){for(n=-1;++n<18;)printf("%d\n",((1<<n)-n)*2-(n<1));puts("NOPE!");}

Try it online!