Company: accenture
Difficulty: medium
City A gets a lot of snow every winter, so snow gauges have been installed at various locations in the city. The amount of snow is expressed as a real number greater than or equal to 0. When an amount of snow that has accumulated becomes close to a specified value, the snow gauges alert the city for the safety of the residents. More specifically, a certain real number X is set to the snow gauges and the alarm is triggered when the difference between the measured amount Y and the real number X , X − Y , becomes less than 1. The city has succeeded in finding the optimum X to one decimal place based on scientific data, but the city's technical ability is low and the snow gauge can only measure the amount of snow as an integer. That is, every time the amount of snow cover reaches an integer value, the snow gauge records the measured snow accumulation. Find the smallest measured quantity Y for which an alarm is triggered.