World cup starts today so one soccer puzzle for sajha soccer fans. Q. Find the total number of goals for the season scored by each of the 11 soccer players on the Brazil team. The total is a prime number. The average is also a prime number. No two players scored the same number of goals. No one scored the same number as the average. No one scored more than 45 goals.
helpjava11 · Jun 12, 2014 11:08 AM · 17,922 views
45,44,43,42,41,40,39,38,7,36,35, Total = 409 Average = 37
prankster · Jun 12, 2014 5:28 PM
Can u please post the method of ur solution as well? I was clueless..
arni1101 · Jun 12, 2014 7:26 PM
I am not sure if this is the correct answer but this is what i did. I assigned each player a score starting from 45 to 35. Then started decreasing the score of the player with 35. Checked total/ avg/ to be prime/ checked same score, decrease further if non of the condition satisfy till 0. Once this reaches 0, I reset the score and pick next player and do same. Of course I wrote a code for it ;). There might be other optimal way to do this and the solution may be more optimal.
prankster · Jun 12, 2014 7:39 PM
May be I should let it run all the way and return the combination that would yield max score..instead of returning on the first satisfied condition.
prankster · Jun 12, 2014 7:45 PM
Pranskster bro, 45,44,43,42,41,40,39,38,7,36,35, ko toal sum 410 aayo mero calculator ma ta.. मिलेन जस्तो छ है .
helpjava11 · Jun 13, 2014 8:54 AM
sorry it was, 45,44,43,42,41,40,39,38,6,36,35 copied the wrong output :P
prankster · Jun 13, 2014 9:15 AM
45,44,43,42,41,40,39,38,6,36,35 = 409/11 = 37.181818 37.18 prime होइन नि त .
helpjava11 · Jun 13, 2014 9:24 AM
changed int to double, 45 44 43 42 41 40 39 38 37 36 34 Total score 439.0 avg 39.90909090909091
prankster · Jun 13, 2014 10:21 AM
Answer: The numbers of goals scored by the 11 players were 5, 7, 11, 13, 17, 19, 29, 31, 37, 41 and 43. There are 14 primes which are less than 45, the eleven from the correct answer plus 2, 3, and 23. The sum of all 14 = 281. The sum of the smallest 11 = 160. The sum of the largest 11 = 271. Let A = the average score of the 11 players. Then A must be a prime between 14.5 and 24.6 which could be 17, 19 or 23. Let S = the sum of two primes which are not used as one of the 11 scores or the average score. Then S = 281 - 11A - A = 281 - 12A. If we substitute the three possible values for A we get S = 77, 51 or 5. So the only solution is S = 2 + 3 and A = 23. The average score is 23.
helpjava11 · Jun 13, 2014 12:18 PM
Why does the score need to be prime? Its not in the question.
prankster · Jun 13, 2014 12:36 PM
WTF!! just watch and enjoy the game!! WC comes once in 4 yrs.
daum · Jun 13, 2014 1:10 PM
Pranskster bro, I dont think the answer have to be prime but looks like thats the only solution. Your answer: Total score 439.0 avg 39.90909090909091 is not correct coz average goal 39.9 is not a prime. Daum bro, there are people who still have to work on World Cup time, its sad but true. Thankfully Final is on Sunday. But I watched Mexizo vs Cameroon during lunch break..lol
helpjava11 · Jun 13, 2014 2:46 PM
This conversation is preserved exactly as it was on the original Sajha.com and can't accept new replies.
Start a New Discussion