{"problem":{"name":"021. Hovercraft","description":{"content":"While testing your hovercraft for Science Olympiad, the hovercraft flew over a pile of boxes in your basement and traveled a total distance of _n_ feet. Given that the boxes are in a rectangular shape","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10269021"},"statements":[{"statement_type":"Markdown","content":"While testing your hovercraft for Science Olympiad, the hovercraft flew over a pile of boxes in your basement and traveled a total distance of _n_ feet. Given that the boxes are in a rectangular shape, and that the hovercraft took off and landed at opposite corners of the pile of boxes, calculate how far you will have to walk to pick up the hovercraft. You are also given the length of one side of the pile of boxes.\n\nThe first line of input contains a single positive integer _n_: how far the hovercraft traveled in feet. The second line of input contains a single positive integer _m_: the length of one side of the file of boxes.\n\nOutput a single positive integer _w_: how far you will have to walk to retrieve the hovercraft.\n\n## Input\n\nThe first line of input contains a single positive integer _n_: how far the hovercraft traveled in feet. The second line of input contains a single positive integer _m_: the length of one side of the file of boxes.\n\n## Output\n\nOutput a single positive integer _w_: how far you will have to walk to retrieve the hovercraft.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n \\in \\mathbb{R}^+ $ be the straight-line distance the hovercraft traveled (diagonal of the rectangle).  \nLet $ m \\in \\mathbb{R}^+ $ be the length of one side of the rectangular pile of boxes.  \nLet $ w \\in \\mathbb{R}^+ $ be the length of the other side of the rectangle (distance to walk).\n\n**Constraints**  \n1. $ n > 0 $  \n2. $ m > 0 $  \n\n**Objective**  \nCompute $ w $ such that:  \n$$\nw = \\sqrt{n^2 - m^2}\n$$  \nOutput $ \\lfloor w \\rfloor $ as a positive integer.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10269021","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}