Hot Dogs
Time limit1sMemory limit128 MB
Read pairs of integers H and P until end of file and print H/P rounded to exactly two decimal places.
- Level
Easy1 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Problem
In 2012 a new world record was set in the famous Nathan's Hot Dog Eating Competition: the champion, Joey Chestnut, ate 68 hot dogs in ten minutes — an amazing increase from the 62 hot dogs the same Chestnut ate in 2011.
Nathan's Famous, in Brooklyn, NY, runs the contest. They make delicious hot dogs that are famous worldwide, but when it comes to math they are not so good. They want to apply to be listed in the Guinness World Records, but to do that they must fill out a form describing basic facts about the competition. In particular, they must report the average number of hot dogs eaten per participant.
Can you help them? They promised to pay you with one of their tasty hot dogs. Given the total number of hot dogs consumed and the total number of participants, write a program to determine the average number of hot dogs eaten per participant.
Input
The input consists of several test cases, one per line. Each line contains two integers and , separated by a space, representing respectively the total number of hot dogs consumed and the total number of participants (). Input continues until end of file.
Output
For each test case, output on its own line the average number of hot dogs eaten per participant, . Print the result with exactly two digits after the decimal point, rounding at the third decimal place (a third decimal digit of 5 or more rounds up).