시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 (추가 시간 없음) | 1024 MB | 241 | 189 | 179 | 77.826% |
You've got a recipe which specifies a number of ingredients, the amount of each ingredient you will need, and the number of portions it produces. But, the number of portions you need is not the same as the number of portions specified in the recipe! How can you scale it?
The first line of input contains three integers $n$ ($1 \le n \le 40$), $x$ and $y$ ($1 \le x,y \le 40{,}000$), where $n$ is the number of ingredients in the recipe, $x$ is the number of portions that the recipe produces, and $y$ is the number of portions you need.
Each of the next $n$ lines contains a single integer $a$ ($1 \le a \le 40{,}000$). These are the amounts of each ingredient needed for the recipe.
The inputs will be chosen so that the amount of each ingredient needed for $y$ portions will be an integer.
Output $n$ lines. On each line output a single integer, which is the amount of that ingredient needed to produce $y$ portions of the recipe. Output these values in the order of the input.
2 4 10 8 12
20 30
3 37627 38021 34571 38009 34189
34933 38407 34547
ICPC > Regionals > North America > Pacific Northwest Regional > 2021 ICPC Pacific Northwest Region > Division 2 N번