killing pigs

This is a discussion on killing pigs within the Contests Board forums, part of the Community Boards category; You have 5 days. You have 20 pigs. You must kill some pigs every day. All pigs should be slaughtered ...

  1. #1
    the Great ElastoManiac's Avatar
    Join Date
    Nov 2005
    Location
    Republika Srpska - Balkan
    Posts
    377

    killing pigs

    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

  2. #2
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,399
    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

  3. #3
    the Great ElastoManiac's Avatar
    Join Date
    Nov 2005
    Location
    Republika Srpska - Balkan
    Posts
    377
    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

  4. #4
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    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

  5. #5
    the Great ElastoManiac's Avatar
    Join Date
    Nov 2005
    Location
    Republika Srpska - Balkan
    Posts
    377
    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

  6. #6
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,399
    Quote Originally Posted by JaWiB
    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...
    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.
    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bush vs. Kerry
    By jlou in forum A Brief History of Cprogramming.com
    Replies: 178
    Last Post: 11-29-2004, 03:45 PM
  2. Killing processes
    By Metal Man in forum C++ Programming
    Replies: 14
    Last Post: 10-24-2003, 09:58 AM
  3. Killing someones grandparents
    By nickname_changed in forum A Brief History of Cprogramming.com
    Replies: 37
    Last Post: 09-07-2003, 08:56 AM
  4. Killing a process.
    By Brian in forum Windows Programming
    Replies: 7
    Last Post: 01-19-2003, 02:36 PM
  5. Why is this killing itself?
    By Unregistered in forum C++ Programming
    Replies: 6
    Last Post: 05-30-2002, 07:31 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21