{"id":209,"date":"2020-08-16T15:13:24","date_gmt":"2020-08-16T19:13:24","guid":{"rendered":"https:\/\/icbg.us\/cpc\/?p=209"},"modified":"2020-08-24T20:57:15","modified_gmt":"2020-08-25T00:57:15","slug":"challenge-08-21-2020","status":"publish","type":"post","link":"https:\/\/icbg.us\/cpc\/challenge-08-21-2020\/","title":{"rendered":"Challenge (08\/21\/2020)"},"content":{"rendered":"\n<p>We post one challenging problem here every week. Solution due is 11:59 PM every Friday. We offer awards to two responders. 1. The first one with the right solution. 2. The correct solution with fewest code statements.<\/p>\n\n\n\n<p>If we get only one correct solution, we will skip the award for the fewest code statements.<\/p>\n\n\n\n<p>You need to create an account in this club in order to participate in this competition. The solution can use one of these three languages: Java, Python, JavaScript. You can submit your solution to this topic. Make sure your name and email account are in the end of the solution.<\/p>\n\n\n\n<p>If you want that we indent your code correctly, please submit your code to this challenge along with a screenshot of your code in your IDE or your code file as an attachment. Remember you still need to submit your code as text here. Thanks for your participation.<\/p>\n\n\n\n<p><strong>Problem: Bob, Jack and Tom are good friends. Bob likes red ball, Jack green and Tom blue. In the beginning of each month they put 10 of red, green and blue ball each into a box so the box has 30 balls (the box is emptied in the beginning of each month before they add 30 balls to it).  Every time they pull three balls out from the box. If these three balls are of three different colors, they will play in the house of that person who pulls the ball. The three balls are returned to the box. If two or more balls pulled out are of the same color, then they go to the house of the person who likes this color to play. They will put these three balls aside (not returning them to the box). They three take turns to pull the balls (Bob, Jack and Tom in this order). In August 20, 2019, there are still 4 red balls and 2 blue balls in the box after 10 pulls. Can you tell me how many times they played in Bob&#8217;s house in max in August by then? Write the scripts to show me all the possibilities in the first 10 pulls.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We post one challenging problem here every week. Solution due is 11:59 PM every Friday. We offer awards to two&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-209","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/icbg.us\/cpc\/wp-json\/wp\/v2\/posts\/209","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/icbg.us\/cpc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/icbg.us\/cpc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/icbg.us\/cpc\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/icbg.us\/cpc\/wp-json\/wp\/v2\/comments?post=209"}],"version-history":[{"count":3,"href":"https:\/\/icbg.us\/cpc\/wp-json\/wp\/v2\/posts\/209\/revisions"}],"predecessor-version":[{"id":218,"href":"https:\/\/icbg.us\/cpc\/wp-json\/wp\/v2\/posts\/209\/revisions\/218"}],"wp:attachment":[{"href":"https:\/\/icbg.us\/cpc\/wp-json\/wp\/v2\/media?parent=209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/icbg.us\/cpc\/wp-json\/wp\/v2\/categories?post=209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/icbg.us\/cpc\/wp-json\/wp\/v2\/tags?post=209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}