You are not logged in. Please login at to post your questions!


[closed] How to solve Topcoder SRM 536 Div 1 Medium?


During the SRM, I coded the following approach:

If the array consists of (n - 1) ones then return n. Otherwise just sum the expected value of each of the dice and round down to the nearest integer. This cleared the examples. As I could not find any case which broke the code, I submitted it. What is wrong with the approach and what is the correct approach? I tried reading others' code but could not understand the logic.

The problem statement:

My (wrong) solution:

asked 15 Mar '12, 17:27

balajiganapath's gravatar image

6★balajiganapath ♦♦
accept rate: 77%

closed 16 Mar '12, 19:14

The question has been closed for the following reason "Because the editorial is available now." by balajiganapath 16 Mar '12, 19:14

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 15 Mar '12, 17:27

question was seen: 2,162 times

last updated: 16 Mar '12, 19:14