#๐Ÿ”’ Lucky card

9 messages ยท Page 1 of 1 (latest)

knotty patrol
#

There are n numbers of cards labeled from 1 to n, each with an index from 1 to n counting from left to right, and the index changes as the number of cards reduces. To find the lucky card, do as follows:

  1. Keep the cards whose index modulus 3 is equal to 2 and discard all others.
  2. If there is more than 1 card left, repeat 1., else return the number labeled on the last card.
    Limitation: 1 second of run time and 1023 MB of memory.
    Input: n varies from 1 to 10^9
hybrid oliveBOT
#

@knotty patrol

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

pure latch
#

Whatโ€™s your code so far?

knotty patrol
pure latch
#

Main thing here is to turn it into code. And then we can help you when you get stuck. But you gotta get stuck first ๐Ÿ˜Ž

knotty patrol
knotty patrol
hybrid oliveBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.