Skip to main content
Saved 1B
Source Link
Luke
  • 4.9k
  • 18
  • 23

JavaScript (ES6), 252 227 227226 bytes

n=>[...n.toString(2,b="If I pull that off will you die? You're a big guy.".split` `,c="It would be extremely painful... for you!".split` `)].map((a,i,j)=>(a!=j[i-1]?(+a?i?`
CIA: `:``)+(+a?`CIA: `:`BANE`
BANE: `):``)+(+a?b:c).shift()).join` `

Usage

f=n=>[...n.toString(2,b="If I pull that off will you die? You're a big guy.".split` `,c="It would be extremely painful... for you!".split` `)].map((a,i,j)=>(a!=j[i-1]?(+a?i?`
CIA: `:``)+(+a?`CIA: `:`BANE`
BANE: `):``)+(+a?b:c).shift()).join` `
f(522300)

Notes

This is golfing-in-progress, I think I can still shave off some bytes, but feel free to leave suggestions in the comments.

JavaScript (ES6), 252 227 bytes

n=>[...n.toString(2,b="If I pull that off will you die? You're a big guy.".split` `,c="It would be extremely painful... for you!".split` `)].map((a,i,j)=>(a!=j[i-1]?(i?`
`:``)+(+a?`CIA: `:`BANE: `):``)+(+a?b:c).shift()).join` `

Usage

f=n=>[...n.toString(2,b="If I pull that off will you die? You're a big guy.".split` `,c="It would be extremely painful... for you!".split` `)].map((a,i,j)=>(a!=j[i-1]?(i?`
`:``)+(+a?`CIA: `:`BANE: `):``)+(+a?b:c).shift()).join` `
f(522300)

Notes

This is golfing-in-progress, I think I can still shave off some bytes, but feel free to leave suggestions in the comments.

JavaScript (ES6), 252 227 226 bytes

n=>[...n.toString(2,b="If I pull that off will you die? You're a big guy.".split` `,c="It would be extremely painful... for you!".split` `)].map((a,i,j)=>(a!=j[i-1]?+a?i?`
CIA: `:`CIA: `:`
BANE: `:``)+(+a?b:c).shift()).join` `

Usage

f=n=>[...n.toString(2,b="If I pull that off will you die? You're a big guy.".split` `,c="It would be extremely painful... for you!".split` `)].map((a,i,j)=>(a!=j[i-1]?+a?i?`
CIA: `:`CIA: `:`
BANE: `:``)+(+a?b:c).shift()).join` `
f(522300)

Notes

This is golfing-in-progress, I think I can still shave off some bytes, but feel free to leave suggestions in the comments.

Unsaved a few bytes to remove leading newline
Source Link
Luke
  • 4.9k
  • 18
  • 23

JavaScript (ES6), 252 215227 bytes

n=>[...n.toString(2,b="If I pull that off will you die? You're a big guy.".split` `,c="It would be extremely painful... for you!".split` `)].map((a,i,j)=>(a-j[i!=j[i-1]?+a(i?`
CIA`:``)+(+a?`CIA: `:`
BANE`BANE: `):``)+(+a?b:c).shift()).join` `

Usage

f=n=>[...n.toString(2,b="If I pull that off will you die? You're a big guy.".split` `,c="It would be extremely painful... for you!".split` `)].map((a,i,j)=>(a-j[i!=j[i-1]?+a(i?`
CIA`:``)+(+a?`CIA: `:`
BANE`BANE: `):``)+(+a?b:c).shift()).join` `
f(522300)

Notes

This is golfing-in-progress, I think I can still shave off some bytes, but feel free to leave suggestions in the comments.

JavaScript (ES6), 252 215 bytes

n=>[...n.toString(2,b="If I pull that off will you die? You're a big guy.".split` `,c="It would be extremely painful... for you!".split` `)].map((a,i,j)=>(a-j[i-1]?+a?`
CIA: `:`
BANE: `:``)+(+a?b:c).shift()).join` `

Usage

f=n=>[...n.toString(2,b="If I pull that off will you die? You're a big guy.".split` `,c="It would be extremely painful... for you!".split` `)].map((a,i,j)=>(a-j[i-1]?+a?`
CIA: `:`
BANE: `:``)+(+a?b:c).shift()).join` `
f(522300)

Notes

This is golfing-in-progress, I think I can still shave off some bytes, but feel free to leave suggestions in the comments.

JavaScript (ES6), 252 227 bytes

n=>[...n.toString(2,b="If I pull that off will you die? You're a big guy.".split` `,c="It would be extremely painful... for you!".split` `)].map((a,i,j)=>(a!=j[i-1]?(i?`
`:``)+(+a?`CIA: `:`BANE: `):``)+(+a?b:c).shift()).join` `

Usage

f=n=>[...n.toString(2,b="If I pull that off will you die? You're a big guy.".split` `,c="It would be extremely painful... for you!".split` `)].map((a,i,j)=>(a!=j[i-1]?(i?`
`:``)+(+a?`CIA: `:`BANE: `):``)+(+a?b:c).shift()).join` `
f(522300)

Notes

This is golfing-in-progress, I think I can still shave off some bytes, but feel free to leave suggestions in the comments.

Saved a lot of bytes
Source Link
Luke
  • 4.9k
  • 18
  • 23

JavaScript (ES6), 252252 215 bytes

n=>[...n.toString(2,b="If I pull that off will you die? You're a big guy.".split` `,c="It would be extremely painful... for you!".split` `)].map(a=>+a?"CIA: "+b.shift():"BANE: "+c.shift()).map((a,i,j)=>i?a[0]==j[i=>(a-1][0]j[i-1]?a.split`+a?`
CIA: `[1]`:`
`+aBANE:a `:``)+(+a?b:c).shift()).join` `

Usage

f=n=>[...n.toString(2,b="If I pull that off will you die? You're a big guy.".split` `,c="It would be extremely painful... for you!".split` `)].map(a=>+a?"CIA: "+b.shift():"BANE: "+c.shift()).map((a,i,j)=>i?a[0]==j[i=>(a-1][0]j[i-1]?a.split`+a?`
CIA: `[1]`:`
`+aBANE:a `:``)+(+a?b:c).shift()).join` `
f(522300)

Notes

This is golfing-in-progress, I think I can still shave off some bytes, but feel free to leave suggestions in the comments.

JavaScript (ES6), 252 bytes

n=>[...n.toString(2,b="If I pull that off will you die? You're a big guy.".split` `,c="It would be extremely painful... for you!".split` `)].map(a=>+a?"CIA: "+b.shift():"BANE: "+c.shift()).map((a,i,j)=>i?a[0]==j[i-1][0]?a.split`: `[1]:`
`+a:a).join` `

Usage

f=n=>[...n.toString(2,b="If I pull that off will you die? You're a big guy.".split` `,c="It would be extremely painful... for you!".split` `)].map(a=>+a?"CIA: "+b.shift():"BANE: "+c.shift()).map((a,i,j)=>i?a[0]==j[i-1][0]?a.split`: `[1]:`
`+a:a).join` `
f(522300)

Notes

This is golfing-in-progress, I think I can still shave off some bytes, but feel free to leave suggestions in the comments.

JavaScript (ES6), 252 215 bytes

n=>[...n.toString(2,b="If I pull that off will you die? You're a big guy.".split` `,c="It would be extremely painful... for you!".split` `)].map((a,i,j)=>(a-j[i-1]?+a?`
CIA: `:`
BANE: `:``)+(+a?b:c).shift()).join` `

Usage

f=n=>[...n.toString(2,b="If I pull that off will you die? You're a big guy.".split` `,c="It would be extremely painful... for you!".split` `)].map((a,i,j)=>(a-j[i-1]?+a?`
CIA: `:`
BANE: `:``)+(+a?b:c).shift()).join` `
f(522300)

Notes

This is golfing-in-progress, I think I can still shave off some bytes, but feel free to leave suggestions in the comments.

Source Link
Luke
  • 4.9k
  • 18
  • 23
Loading