Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 40 Online
OpenStudy (anonymous):

what does the teacher mean for ps2 question 3, the largest number? can't it go on forever?

OpenStudy (anonymous):

nope, it doesn't go on for ever, at some point all numbers above n can be bought. n is the largest number that cannot be bought - write a program to find n. assume the theorem presented prior to question 2 is correct - did you figure out why the theorem is correct?

OpenStudy (anonymous):

well I think it can go on forever in a general case, that's why we need a limit for the loop (for n in range(1, 200) ), in the example of the McNuggets (6, 9, 20) as there's 6 successive numbers that can be bought, according to the theorem there must be a largest number that can't be bought.

OpenStudy (anonymous):

It can't go on forever. It will probably help to make a list on paper. Basically, once reach a certain point in the "tens" column i(1, 2, 3, 4, 5 for 10, 20, 30, 40, 50, respectively), you have all 10 digits in the "ones" column (0-9).

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Breathless: womp
8 minutes ago 0 Replies 0 Medals
Breathless: yo who wanna match pfp?
11 minutes ago 11 Replies 1 Medal
Ylynnaa: This was long time ago lmk if u fw itud83dude1d
3 hours ago 17 Replies 2 Medals
abound: Wow question cove really fell off
6 hours ago 6 Replies 1 Medal
ayden09: chat i love black pink hehe i like jones to
5 hours ago 20 Replies 2 Medals
kamani7676: help
1 day ago 5 Replies 1 Medal
kamani7676: Help
1 day ago 76 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!