A8567 | Wizards and Demonstration
时间限制1s
内存限制256MB
通过 / 提交0/0
题目描述
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.
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.
输入格式
The first line contains three space-separated integers, $n$ , $x$ , $y$ ( $1<=n,x,y<=10^{4},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$ ).
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$ ).
输出格式
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).
输入输出样例
输入 #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.
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.
C++ 编辑器
输入
输出
可保存默认模板;新题优先使用已保存模板。
当前快捷键仅展示,暂不支持修改。
- 撤销
Ctrl / ⌘ + Z - 重做
Ctrl / ⌘ + Y - 查找
Ctrl / ⌘ + F - 全选
Ctrl / ⌘ + A - 复制
Ctrl / ⌘ + C - 剪切
Ctrl / ⌘ + X - 粘贴
Ctrl / ⌘ + V - 自动排版
工具栏排版按钮 - 草稿保存
编辑时自动保存到本机
历史
提交记录
状态说明时间源码
AI
作答助手
你好,我是作答助手。可以问思路、复杂度、样例含义或代码报错原因;不会直接给出完整 AC 代码。
确定要清空代码吗?
提交通过
评测结果:Accepted