You have 5 days.
You have 20 pigs.
You must kill some pigs every day. All pigs should be slaughtered at the fifth day.
The Number of pigs killed per day must be odd.
Write it like this:
7,1,5,3,1
You have 5 days.
You have 20 pigs.
You must kill some pigs every day. All pigs should be slaughtered at the fifth day.
The Number of pigs killed per day must be odd.
Write it like this:
7,1,5,3,1
lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu
I'm sorry; I missed the part where there was a question or, since this is the contest board, a challenge.
If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein
Write the day and how many pigs you killed. Write all the kills in five days.
Your goal is to kill all the pigs. But only killing odd number of pigs.
lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu
I don't think this is even possible. If you add an odd number of odd numbers, isn't the result always an odd number? (eg, 1+1+1=3, 3+5+1 = 9, 3+7+9+1+1=21)
There's probably a way to prove it, but I've never been one for proofs...
"Think not but that I know these things; or think
I know them not: not therefore am I short
Of knowing what I ought."
-John Milton, Paradise Regained (1671)
"Work hard and it might happen."
-XSquared
I don't know if it's possible, my friend told me this.
I'l have to beat him up if i prove this is immposible.
lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu
Yes, you are correct. If you add an even number of odd numbers together, you always get an even number. Adding an odd number to that (or any other) even number yields an odd number.Originally Posted by JaWiB
If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein