Last updated
Was this helpful?
Last updated
Was this helpful?
This task seems to be more about following (kind of vague) instructions and anticipating error conditions rather than solving a rather simple problem.
I notice that units are specified for neither measurement; time nor rainfall accumulation. Time is assumed to always increment in units of one, rainfall in some non-negative integer. "Integer" gets a little leeway in this entry. Floating point numbers or Rational numbers that are exactly equal to an Integer are allowed, even if they are technically not integers.
Not going to bother to allow negative rainfall amounts. The "Negative rainfall" cited in the linked article references "total accumulated groundwater" NOT precipitation. Evaporation isn't rainfall. Much like dew or fog is not rainfall.
Further, the linked reference article for Soloway's Recurring Rainfall SPECIFICALLY discusses marking an implementation as incorrect, or at least lacking, if it doesn't ignore and discard negative entries. You can't have it both ways.