033. Free Throws

Codeforces
IDCF10269033
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
While watching a basketball game, you wonder what your team's total free throw percentage is. You are given how many free throws each player on your team has made and attempted. Given these values, calculate your team's free throw percentage. The first line of input consists of a positive integer $n$: the number of players on your team. The next $n$ lines consist of two space-separated integers: how many free throws each player has made and attempted, respectively. Output a single decimal number, representing your team's free throw percentage during the game. *Round your answer to two decimal places.* ## Input The first line of input consists of a positive integer $n$: the number of players on your team. The next $n$ lines consist of two space-separated integers: how many free throws each player has made and attempted, respectively. ## Output Output a single decimal number, representing your team's free throw percentage during the game. *Round your answer to two decimal places.* [samples]
**Definitions** Let $ n \in \mathbb{Z}^+ $ be the number of players. For each player $ i \in \{1, \dots, n\} $, let $ m_i \in \mathbb{Z}_{\geq 0} $ be the number of free throws made, and $ a_i \in \mathbb{Z}^+ $ be the number of free throws attempted. **Constraints** 1. $ n \geq 1 $ 2. $ 0 \leq m_i \leq a_i $ for all $ i \in \{1, \dots, n\} $ **Objective** Compute the team's free throw percentage: $$ P = \frac{\sum_{i=1}^{n} m_i}{\sum_{i=1}^{n} a_i} \times 100 $$ Round $ P $ to two decimal places.
API Response (JSON)
{
  "problem": {
    "name": "033. Free Throws",
    "description": {
      "content": "While watching a basketball game, you wonder what your team's total free throw percentage is. You are given how many free throws each player on your team has made and attempted. Given these values, ca",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269033"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "While watching a basketball game, you wonder what your team's total free throw percentage is. You are given how many free throws each player on your team has made and attempted. Given these values, ca...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ be the number of players.  \nFor each player $ i \\in \\{1, \\dots, n\\} $, let $ m_i \\in \\mathbb{Z}_{\\geq 0} $ be the number of free throws made, and $ a_i \\in...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments