Forum — Daily Challenge
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login

    Alternative solution

    Module 3 Day 3 Your Turn Part 2
    2
    2
    30
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      professionalbronco M0★ M1★ M2★ M3 M5★
      last edited by

      Here is a complementary counting approach: Note that 2,3,5 are all prime. The next 2 prime numbers are 7 and 11, and the product of them is 77. That is greater than 30, so we just need to subtract off the # of primes that are less than 30 (and 1), other than 2,3,5 . We find the next primes are 7,11,13,17,19,23,29. Thus, we get the answer 30 - (7+1) = 22.

      The Daily Challenge with Po-Shen Loh is the best!
      aops user = captainnobody

      audreyA 1 Reply Last reply Reply Quote 3
      • audreyA
        audrey MOD @professionalbronco
        last edited by

        @professionalbronco Yes, that definitely works! It's interesting how both strategies are useful in different cases- Prof. Loh's method is faster when considering larger numbers, but yours is quicker in this case with smaller numbers 🙂 Nice!

        1 Reply Last reply Reply Quote 2

        • 1 / 1
        • First post
          Last post
        Daily Challenge | Terms | COPPA