Skip to main content
5 of 9
edited body
kirbyfan64sos
  • 9.2k
  • 1
  • 26
  • 46

#C, 36 bytes each (50 bytes for the bonus challenge)

p(i){return 3500459>>(4*(7+~i))&15;}
b(i){return 2390221>>(4*(7+~i))&15;}

I'm sorry...I just couldn't help it... Ok, I put a real solution now.

##Bonus challenge

f(i,t){return (2390221+t*1110238)>>(4*(7+~i))&15;}

Use f(button,0) and f(pin,1).

##Originals:

p(i){int a[]={3,5,6,9,10,11};return a[i-1];}
b(i){int a[]={2,4,7,8,12,13};return a[i-1];}
kirbyfan64sos
  • 9.2k
  • 1
  • 26
  • 46