Problem Clarifications

This is an archive of the judge's response to questions on the problems. You should have received an email with the response already. This is available just in case the email got tossed to the Great Bit Bucket in the Sky.

  1. Problem 1
  2. Problem 2
  3. Problem 3
  4. Problem 4
  5. Problem 5
  6. Problem 6

Problem 1

-- Just to be clear, the input values for problem are integers. They may be negative (or 0). All 4 being 0 indicates end of input.

Problem 2


Problem 3

-- > Are you sure that your output for number 3 is correct? When doing the
-- > third test case by hand we get 17.

I got 22 by hand (and by solution).

--> Are a, n and p positive, or just non-negative? That is, could either be 0?
They are all positive. 0s only appear in the last input line to terminate input.

-- > Does the judge's compiler support the function itoa?

Nope.
It's not a standard thing and can't be done portably because of varying implementations. You probably want something like `sprintf' or use the `stringstream' class.


Problem 4


Problem 5


Problem 6