Jump to content

Recommended Posts

Posted

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?

Posted
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?)

Posted
:P yeah the book I got it from was written more than 40 years ago, when computers took years to add numbers
Posted

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.

Posted

"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. :)

Posted
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

Posted

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);

}

  • 2 weeks later...
Posted

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....

Posted
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?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.