QOJ.ac

QOJ

시간 제한: 1.0 s 메모리 제한: 32 MB 총점: 30

#17006. 聚会

통계

在一场盛大的派对结束后的第二天,大家都想知道两件事——谁参加了派对,以及有多少人去了?由于派对通常规模很大,实际上没有人知道确切的人数。你的朋友 Krešo 上周六参加了派对,他知道每 $1\text{ m}^2$(平方米)有多少人。

在阅读了 5 篇关于该派对的新闻报道后,你记录下了 5 个数字,分别表示每篇报道中声称的派对人数。你相信 Krešo 的信息,并且想知道每篇报道的预测人数与实际人数相差多少。

输入格式

输入的第一行包含两个正整数 $L$ ($1 \le L \le 10$),表示每平方米的人数,以及 $P$ ($1 \le P \le 1000$),表示举办派对的房间面积(平方米)。

输入的第二行包含 5 个小于 $10^6$ 的正整数,分别表示每篇新闻报道中声称的派对人数。

输出格式

输出的第一行也是唯一一行应当包含 5 个整数,分别表示每篇报道中的人数与 Krešo 计算出的(正确)人数之间的差值。

样例

输入样例 1

1 10
10 10 10 10 10

输出样例 1

0 0 0 0 0

输入样例 2

5 20
99 101 1000 0 97

输出样例 2

-1 1 900 -100 -3

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.