#C, 36 bytes each (49 bytes for the bonus challenge)
C, 36 bytes each (49 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, 49 bytes
Bonus challenge, 49 bytes
f(i,t){return(2390221+t*1110238)>>(4*(7+~i))&15;}
Use f(button,0)
and f(pin,1)
.
##Originals:
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];}