"first" lmao

const movie = (card, ticket, part) => { let i = 0 let a = 0 let b = card do { a += ticket b += ticket * part ** i i++ } while (Math.ceil(b) >= a) return i - 1 }

an "optimization" (no power)

const movie = (card, ticket, part) => { let i = 0 let a = 0 let b = card let cheap = ticket while (true) { a += ticket b += cheap cheap *= part if (Math.ceil(b) < a) return i i++ } }

"optimization II" (no Math.ceil, comparison with 0 instead of 1)

Math.ceil

const movie = (card, ticket, part) => { let i = 0 let dif = -card - 1 let cheap = ticket while (true) { dif += ticket - cheap cheap *= part if (dif > 0) return i i++ } }

idiocy.

const movie = (card, ticket, part) => { let i = 1 let dif = -card - 1 let cheap = ticket while ((dif += ticket - (cheap *= part)) <= 0) i++ return i }

denied on first lol

Check timestamp by hovering the date lol

We're a place where coders share, stay up-to-date and grow their careers.

We strive for transparency and don't collect excess data.

## re: Daily Challenge #69 - Going to the Cinema VIEW POST

FULL DISCUSSION"first" lmao

an "optimization" (no power)

"optimization II" (no

`Math.ceil`

, comparison with 0 instead of 1)idiocy.

denied on first lol

Check timestamp by hovering the date lol