psi20 Posted November 24, 2004 Share Posted November 24, 2004 This is taken from a puzzle book. I used to have 750 marbles in my bedroom but I lost some. The number of marbles remaining is one more than a multiple of three, three more than a multiple of five, five more than a multiple of seven, and seven more than a multiple of eleven. How many marbles did I lose? Link to comment Share on other sites More sharing options...
Callipygous Posted November 24, 2004 Share Posted November 24, 2004 17 Link to comment Share on other sites More sharing options...
MolecularMan14 Posted November 24, 2004 Share Posted November 24, 2004 733 left Link to comment Share on other sites More sharing options...
LucidDreamer Posted November 24, 2004 Share Posted November 24, 2004 How come every time I check these puzzles somebody has already solved it? You people are too smart. Link to comment Share on other sites More sharing options...
psi20 Posted November 24, 2004 Author Share Posted November 24, 2004 Yep Link to comment Share on other sites More sharing options...
Callipygous Posted November 24, 2004 Share Posted November 24, 2004 How come every time I check these puzzles somebody has already solved it? You people are too smart. its pretty easy if you use java : P (was i not supposed to use java?) Link to comment Share on other sites More sharing options...
psi20 Posted November 24, 2004 Author Share Posted November 24, 2004 yeah the book I got it from was written more than 40 years ago, when computers took years to add numbers Link to comment Share on other sites More sharing options...
TimeTraveler Posted November 24, 2004 Share Posted November 24, 2004 Lol. I did it the hard way, first I fugured that 3 more than a multiple of 5 would have end in either a 3 or an 8 then went through the multiples of n11+7 and kept out the ones ending in 3 or 8. After that I went through the possibilities and subtracted 1 and divided by 3, if it was divisible then I tried subtracting 5 and dividing by 7. It figures the last number I got to was the correct answer. Them bastages! But yeah 17 marbles missing, 733 marbles accounted for. Link to comment Share on other sites More sharing options...
Gilded Posted November 24, 2004 Share Posted November 24, 2004 "I did it the hard way, first I fugured that 3 more than a multiple of 5 would have end in either a 3 or an 8 then went through the multiples of n11+7 and kept out the ones ending in 3 or 8. After that I went through the possibilities and subtracted 1 and divided by 3, if it was divisible then I tried subtracting 5 and dividing by 7. It figures the last number I got to was the correct answer." Well you have certainly lost your marbles. Link to comment Share on other sites More sharing options...
MolecularMan14 Posted November 24, 2004 Share Posted November 24, 2004 Lol. I did it the hard way' date=' first I fugured that 3 more than a multiple of 5 would have end in either a 3 or an 8 then went through the multiples of n11+7 and kept out the ones ending in 3 or 8. After that I went through the possibilities and subtracted 1 and divided by 3, if it was divisible then I tried subtracting 5 and dividing by 7. It figures the last number I got to was the correct answer. Them bastages! But yeah 17 marbles missing, 733 marbles accounted for.[/quote'] same Link to comment Share on other sites More sharing options...
Callipygous Posted November 24, 2004 Share Posted November 24, 2004 AHAHAHAHA. thats me laughing uproariously because you did so much more work than me : ) my work is presented below (in full) int multThree=0; int multFive=0; int multSeven=0; int multEleven=0; for(int a=0; a<=750;a++) { if(multThree+3<a) multThree+=3; if(multFive+5<a) multFive+=5; if(multSeven+7<a) multSeven+=7; if(multEleven+11<a) multEleven+=11; if(multThree+1==a && multFive+3==a && multSeven+5==a && multEleven+7==a) System.out.println("a = " +a); } Link to comment Share on other sites More sharing options...
Severian Posted December 7, 2004 Share Posted December 7, 2004 Callipygous: that is a lot more work than doing it by hand. Since you know 11*d+7 <=750 (with d an integer) you must have d<=67, so you start with 67 and see if (11*d+7-5) is a multiple of 7. The second number you try (d=66) gives the right answer.... Link to comment Share on other sites More sharing options...
Callipygous Posted December 7, 2004 Share Posted December 7, 2004 Callipygous: that is a lot more work than doing it by hand. Since you know 11*d+7 <=750 (with d an integer) you must have d<=67' date=' so you start with 67 and see if (11*d+7-5) is a multiple of 7. The second number you try (d=66) gives the right answer....[/quote'] yeah, but you actually had to work out the logic and do the math for that. all i had to do is the logic portion and let the computer do the rest for me. type in what? 10 lines? and im done. andthe fact that you only had to do 2 is just lucky... what if you were 10 numbers away? or 20? you get to go through and check each one? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now