This is a read-only archive. No new posts or registrations. Privacy Page
Discussion

Monday Madness

5 min read

This thread's last reply is from . Advice, software, and links below may be out of date — treat specific steps and download links with caution.

Two local towns are rivals in everything. They compete against each other in every sport you can imagine - and perhaps a few you can't.

Each spring they have a "Cow Chip throwing Contest". The teams from each town are known as "The Cow Patties" and "The Organic Frisbee Flingers". Both teams are comprised of both men and women and 100 matches are held to determine the winner.

The majority of the players on each team were men. There were more women on "The Cow Patties" team than on "The Organic Frisbee Flingers" team. Play is arranged so that the matches are men vs. men, and women vs. women as much as possible. This meant that there were some mixed matches because there were more female "Patties" then female "Flingers".

Where men played men, "Flingers" won three matches out of five. Where women played women, "Patties" won two matches out of three. Where the "Flingers" extra men met "Patties" extra women, the "Flingers" players won two-thirds of the matches. No game ended in a draw. The result was a narrow win for "Flingers" by 51 games to 49.

How many men competed for "The Organic Frisbee Flingers"?
i was waiting till Saturday before i tried to solve it, giving chrissy and others more time at it. you'll have my answer before sunday if i can work it out. :D :popcorn:
I think you should write a script to solve the problem. I'm guessing you'll use bash (which I know absolutely nothing about) but if you provide the script… I can surely figure out how to run it on a live CD or something. :popcorn:
nope just plain old pen and paper and lots of trial and error usually. :rofl: i'll see if i can work out the logic and come up with a bash script for you tho. :pullhair: :popcorn:
ok tomk here you go, i have 4 answers for you and the script.


#!/bin/bash

function result {
y=0;z=0;q=0;r=0
y=$(($teamAmen+$teamBmen+$teamAmixed+$teamBmixed));z=$(($teamAwomen+$teamBwomen))
q=$(($teamAmixed+$teamBmixed+$teamAwomen+$teamBwomen));r=$(($teamAmen+$teamBmen))
echo "Flingers :- men won $teamAmen games, women won $teamAwomen games, men against women won $teamAmixed."
echo "total games won = 51. Number of men on team = $y Number of women on team = $z." 
echo "———————————————————————————————————"
echo "Patties :- men won $teamBmen games, women won $teamBwomen games, women against men won $teamBmixed."
echo "total games won = 49. Number of men on team = $r Number of women on team = $q."
echo
echo "============================================================"
echo
}
#======================

function firstloop {
for two in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23;do
teamBwomen=$(($two*2));teamAwomen=$(($two))
secondloop
done
}
#======================

function secondloop {
count=1;a=0;b=0;x=0
until [ $count -gt 51 ];do
x=$(($x+1))
teamBmixed=$x;teamAmixed=$((2*$x))
a=$(($teamAmen+$teamAwomen+$teamAmixed));b=$(($teamBmen+$teamBwomen+$teamBmixed))
if [[ $a -eq 51 && $b -eq 49 ]];then result
else count=$(($teamAmen+$teamAwomen+$teamAmixed));fi
done
}
#=====================

teamAmen=0;teamAwomen=0;teamAmixed=0
teamBmen=0;teamBwomen=0;teamBmixed=0
for one in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16;do
teamBmen=$((2*$one));teamAmen=$((3*$one))
firstloop
done
echo "finished"

answers

mainpc@mainpc:~> sh "new bash script"
Flingers :- men won 6 games, women won 15 games, men against women won 30.
total games won = 51. Number of men on team = 55 Number of women on team = 45.
———————————————————————————————————
Patties :- men won 4 games, women won 30 games, women against men won 15.
total games won = 49. Number of men on team = 10 Number of women on team = 90.

===================================================================

Flingers :- men won 15 games, women won 14 games, men against women won 22.
total games won = 51. Number of men on team = 58 Number of women on team = 42.
———————————————————————————————————
Patties :- men won 10 games, women won 28 games, women against men won 11.
total games won = 49. Number of men on team = 25 Number of women on team = 75.

===================================================================

Flingers :- men won 24 games, women won 13 games, men against women won 14.
total games won = 51. Number of men on team = 61 Number of women on team = 39.
———————————————————————————————————
Patties :- men won 16 games, women won 26 games, women against men won 7.
total games won = 49. Number of men on team = 40 Number of women on team = 60.

===================================================================

Flingers :- men won 33 games, women won 12 games, men against women won 6.
total games won = 51. Number of men on team = 64 Number of women on team = 36.
———————————————————————————————————
Patties :- men won 22 games, women won 24 games, women against men won 3.
total games won = 49. Number of men on team = 55 Number of women on team = 45.

=================================================================

finished


just copy the script into a text file and save it, i named mine "new bash script".
then to run it just type in a console
sh "new bash script"
not very elegant or efficient but it got the job done. :D
took me longer to get the script working than it would probably have taken me to work it out on paper, couldn't remember any of the syntax and rules so had to keep looking at the last script i wrote to try and figure things out. :rofl:

so anyway the 4 answers are.. the number of men on the flingers team are - 55 or 58 or 61 or 64.

i believe if my logic was correct all those answers fulfill the criteria.

:popcorn:
Well done terry1966…. but… all those answers do not fulfill the criteria. There is only one correct answer - not 4.

What is it?
ah!! i missed this "The majority of the players on each team were men."

therefore only the last answer meets all the criteria.

Flingers :- men won 33 games, women won 12 games, men against women won 6.
total games won = 51. Number of men on team = 64 Number of women on team = 36.
———————————————————————————————————
Patties :- men won 22 games, women won 24 games, women against men won 3.
total games won = 49. Number of men on team = 55 Number of women on team = 45.


so answer is 64.

:popcorn:
They burn pretty well once dried out. I prefer my campfires to be made from wood but on the great plains - wood is few and far between and therefore not really an option. Several years ago - an "artist" stopped by while I was out working in the field and asked for permission to pick some up. He said that he uses them in his art projects. I told him he could help himself. He drove around the field (25 acres or so) for several hours and selected 100 or so prime specimens. I haven't a clue as to how he utilized them in his art. I didn't even bother to get his name. If anybody wants some… I've got lots to choose from. At least until I harrow the fields which won't be for another week or two.