QOJ.ac

QOJ

Límite de tiempo: 1 s Límite de memoria: 2048 MB Puntuación total: 100

#2916. 配方缩放

Estadísticas

你有一份食谱,上面列出了所需的配料种类、每种配料的用量,以及该食谱所能制作的份数。但是,你需要的份数与食谱中指定的份数不同!你该如何按比例调整配料用量呢?

输入格式

输入的第一行包含三个整数 $n$ ($1 \le n \le 40$)、$x$ 和 $y$ ($1 \le x, y \le 40,000$),其中 $n$ 是食谱中配料的种类数,$x$ 是食谱原本能制作的份数,$y$ 是你需要的份数。

接下来的 $n$ 行,每行包含一个整数 $a$ ($1 \le a \le 40,000$),表示食谱中每种配料所需的用量。

输入数据保证,制作 $y$ 份所需的每种配料用量均为整数。

输出格式

输出 $n$ 行。每行输出一个整数,表示制作 $y$ 份食谱所需的对应配料用量。请按输入顺序输出这些值。

样例

样例输入 1

2 4 10
8
12

样例输出 1

20
30

样例输入 2

3 37627 38021
34571
38009
34189

样例输出 2

34933
38407
34547

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.