Jump to content

I've lost my marbles


psi20

Recommended Posts

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

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

"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

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

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

  • 2 weeks later...

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

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

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.