CF168A.Wizards and Demonstration

入门

通过率:0%

时间限制:2.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Some country is populated by wizards. They want to organize a demonstration.

There are n people living in the city, x of them are the wizards who will surely go to the demonstration. Other city people (n - x people) do not support the wizards and aren't going to go to the demonstration. We know that the city administration will react only to the demonstration involving at least y percent of the city people. Having considered the matter, the wizards decided to create clone puppets which can substitute the city people on the demonstration.

So all in all, the demonstration will involve only the wizards and their puppets. The city administration cannot tell the difference between a puppet and a person, so, as they calculate the percentage, the administration will consider the city to be consisting of only n people and not containing any clone puppets.

Help the wizards and find the minimum number of clones to create to that the demonstration had no less than y percent of the city people.

某个国家居住着一群巫师。他们打算组织一场示威活动。

该城市共有 nn 位居民,其中 xx 位是必定参加示威的巫师。其余城市居民(共 n−xn - x 人)不支持巫师,也不会参加示威。已知市政府仅当示威人数至少达到城市总人口的 y%y\% 时,才会做出反应。经过商议,巫师们决定制造克隆傀儡,以代替那些不愿参加示威的普通市民。

因此,整场示威活动将仅由巫师及其克隆傀儡组成。市政府无法区分傀儡与真实人类;因此,在计算百分比时,市政府仍将城市总人口视为 nn 人,且不将任何克隆傀儡计入总人口。

请帮助巫师们求出:为使示威人数不少于城市总人口的 y%y\%,所需制造的克隆傀儡的最少数量。

输入格式

The first line contains three space-separated integers, n, x, y (1 ≤ n, x, y ≤ 104, x ≤ n) — the number of citizens in the city, the number of wizards and the percentage the administration needs, correspondingly.

Please note that y can exceed 100 percent, that is, the administration wants to see on a demonstration more people that actually live in the city ( > n).

第一行包含三个以空格分隔的整数 nn、xx、yy(1≤n, x, y≤1041 \leq n,\, x,\, y \leq 10^4,且 x≤nx \leq n)——分别表示城市中的市民总数、巫师数量以及政府所要求的百分比。

请注意,yy 可能超过 100%100\%,即政府希望在示威活动中看到的人数多于城市实际居住人口(>n> n)。

输出格式

Print a single integer — the answer to the problem, the minimum number of clones to create, so that the demonstration involved no less than y percent of n (the real total city population).

输出一个整数——该问题的答案,即需要创建的克隆体的最小数量,使得演示所涉及的人数不少于 $ n $(城市实际总人口)的 $ y% $。

输入输出样例

  • 输入#1

    10 1 14

    输出#1

    1
  • 输入#2

    20 10 50

    输出#2

    0
  • 输入#3

    1000 352 146

    输出#3

    1108

说明/提示

In the first sample it is necessary that at least 14% of 10 people came to the demonstration. As the number of people should be integer, then at least two people should come. There is only one wizard living in the city and he is going to come. That isn't enough, so he needs to create one clone.

In the second sample 10 people should come to the demonstration. The city has 10 wizards. They will all come to the demonstration, so nobody has to create any clones.

在第一个样例中,至少需要 10 人的 14% 参加示威活动。由于人数必须为整数,因此至少需要两人参加。该城市只住着一名巫师,且他将参加示威活动。这还不够,因此他需要制造一个克隆体。

在第二个样例中,应有 10 人参加示威活动。该城市共有 10 名巫师,他们全部会参加示威活动,因此无需任何人制造克隆体。

输入解题思路,AI测评打分。不知道怎么写?

首页