064. Gas Cost

Codeforces
IDCF10269064
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
When using an automobile, one often seeks to understand what they will be expected to pay for the usage of gas resources. The cost of driving a certain distance can be calculated based on the miles per gallon(mpg) of the car, the distance traveled, and the cost per gallon currently. Taking in these three values as input, determine the total cost of the trip. The first line contains three space-separated floating point values that represent the miles per gallon, distance, and cost per gallon respectively. Output a single floating point value that represents the dollar cost of the designated trip. ## Input The first line contains three space-separated floating point values that represent the miles per gallon, distance, and cost per gallon respectively. ## Output Output a single floating point value that represents the dollar cost of the designated trip. [samples]
**Definitions** Let $ \text{mpg} \in \mathbb{R}^+ $ denote the fuel efficiency in miles per gallon. Let $ d \in \mathbb{R}^+ $ denote the distance traveled in miles. Let $ c \in \mathbb{R}^+ $ denote the cost per gallon in dollars. **Constraints** All inputs are positive real numbers. **Objective** Compute the total cost $ C $ of the trip: $$ C = \frac{d}{\text{mpg}} \cdot c $$
API Response (JSON)
{
  "problem": {
    "name": "064. Gas Cost",
    "description": {
      "content": "When using an automobile, one often seeks to understand what they will be expected to pay for the usage of gas resources. The cost of driving a certain distance can be calculated based on the miles pe",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269064"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "When using an automobile, one often seeks to understand what they will be expected to pay for the usage of gas resources. The cost of driving a certain distance can be calculated based on the miles pe...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ \\text{mpg} \\in \\mathbb{R}^+ $ denote the fuel efficiency in miles per gallon.  \nLet $ d \\in \\mathbb{R}^+ $ denote the distance traveled in miles.  \nLet $ c \\in \\mathbb{R}^+ $ d...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments