Precise Average (avg)

183 teams scored 11985 points on this task, for a maximum score of 100, an average score of 65 and a median score of 60.

Highlights

  1. I.S. Castelli, Brescia is the institute with the most points (529).
  2. Lombardia is the region with the most points (2951).

Statement

Your friend John works at a shop that sells N types of products, numbered from 0 to N-1. Product i has a price of P_i bytedollars, where P_i is a positive integer. The government of Byteland has created a new law for shops. The law states that the average of the prices of all products in a shop should be exactly K, where K is a positive integer. John's boss gave him the task to change the prices of the products so the shop would comply with the new law. \footnotetextPhoto credits: Diego Delso, http://delso.photodelso.photo, License CC-BY-SA He has lots of other stuff to do, so he asked you for help: what is the minimum number of products whose prices should be changed? A product's price can be changed to any positive integer amount of bytedollars.