077. That Hertz!

Codeforces
IDCF10269077
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
You are an event organizer, tasked with planning an event in a very large, outdoors area. However, you only have two very powerful speakers, which are placed on both ends of the stage. You assume that there will be crowds spanning large lengths at this meeting, and need to figure out how long it takes for the sound from the stage to reach the furthest attendees of the event. However, an engineer helping to organize the event reminds you that the speed of sound is varied, depending on the temperature. As you are planning the event in Syracuse, this is a serious problem, as the temperatures are very unpredictable. The approximate formula for the speed of sound (assuming there is no humidity in the air, is): $V = (331. 3 +. 606 ∙ theta.alt)$ Where $V$ is the speed of sound in meters per second, and $theta.alt$ is the temperature of the air, in degrees Celsius. The first line of the input will denote integer $n$, the number of test cases following the line. The lines following will contain two values each, the first being the integer temperature $theta.alt$, and second being the distance between the stage and the furthest edges of the crowd, measured in km. Output the time it takes for the sound from the stage to reach the furthest edges of the crowd in seconds, rounded to the nearest hundred. ## Input The first line of the input will denote integer $n$, the number of test cases following the line. The lines following will contain two values each, the first being the integer temperature $theta.alt$, and second being the distance between the stage and the furthest edges of the crowd, measured in km. ## Output Output the time it takes for the sound from the stage to reach the furthest edges of the crowd in seconds, rounded to the nearest hundred. [samples]
**Definitions** Let $ n \in \mathbb{Z} $ be the number of test cases. For each test case $ k \in \{1, \dots, n\} $: - Let $ \theta_k \in \mathbb{R} $ be the air temperature in degrees Celsius. - Let $ d_k \in \mathbb{R} $ be the distance from the stage to the furthest attendees in kilometers. **Constraints** 1. $ 1 \leq n \leq \text{unknown} $ (implied by input format) 2. $ \theta_k \in \mathbb{R} $, $ d_k > 0 $ **Objective** For each test case $ k $, compute the time $ t_k $ (in seconds) for sound to travel distance $ d_k $, given the speed of sound: $$ V_k = 331.3 + 0.606 \cdot \theta_k \quad \text{(m/s)} $$ Convert distance to meters: $ d_k \text{ km} = 1000 \cdot d_k \text{ m} $. Then: $$ t_k = \frac{1000 \cdot d_k}{V_k} $$ Output $ t_k $ rounded to the nearest hundred (i.e., to the nearest multiple of 100).
API Response (JSON)
{
  "problem": {
    "name": "077. That Hertz!",
    "description": {
      "content": "You are an event organizer, tasked with planning an event in a very large, outdoors area. However, you only have two very powerful speakers, which are placed on both ends of the stage. You assume tha",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269077"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are an event organizer, tasked with planning an event in a very large, outdoors area. However, you only have two very powerful speakers, which are placed on both ends of the stage.\n\nYou assume tha...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the number of test cases.  \nFor each test case $ k \\in \\{1, \\dots, n\\} $:  \n- Let $ \\theta_k \\in \\mathbb{R} $ be the air temperature in degrees Celsius.  ...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments