Skip to main content
Commonmark migration
Source Link

#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).

Live demo at Ideone.

Screenshot

##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];}

#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

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

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

Live demo at Ideone.

Screenshot

##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];}

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

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

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

Live demo at Ideone.

Screenshot

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];}
broken image fixed (click 'rendered output' or 'side-by-side' to see the difference; image retrieved via Wayback Machine); for more info, see https://gist.github.com/Glorfindel83/9d954d34385d2ac2597bbe864466259f
Source Link

#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

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

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

Live demo at Ideone.

ScreenshotScreenshot

  

##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];}

#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

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

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

Live demo at Ideone.

Screenshot

 

##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];}

#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

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

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

Live demo at Ideone.

Screenshot

 

##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];}
replaced http://s11.postimg.org/ with https://s11.postimg.org/
Source Link

#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

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

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

Live demo at Ideone.

Screenshot http://s11.postimg.org/y832zg8tf/gpin2.pngScreenshot

##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];}

#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

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

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

Live demo at Ideone.

Screenshot http://s11.postimg.org/y832zg8tf/gpin2.png

##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];}

#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

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

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

Live demo at Ideone.

Screenshot

##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];}
added 9 characters in body
Source Link
kirbyfan64sos
  • 9.2k
  • 1
  • 26
  • 46
Loading
edited body
Source Link
kirbyfan64sos
  • 9.2k
  • 1
  • 26
  • 46
Loading
edited body
Source Link
kirbyfan64sos
  • 9.2k
  • 1
  • 26
  • 46
Loading
added 137 characters in body
Source Link
kirbyfan64sos
  • 9.2k
  • 1
  • 26
  • 46
Loading
deleted 45 characters in body
Source Link
kirbyfan64sos
  • 9.2k
  • 1
  • 26
  • 46
Loading
Source Link
kirbyfan64sos
  • 9.2k
  • 1
  • 26
  • 46
Loading