编程介的小学生 2017-04-01 02:28 采纳率: 20.5%
浏览 713
已采纳

Satan. Go Away

watashi is a sport lover and he selects different kind of PE every semester. Usually he is satisfied with his choose, but this term, after the first badminton class started, he gets mad with the teacher "Satan. ChenTooBad" at his snap at the students with no reason at the first sight of them.

watashi will revenge to "Satan. ChenTooBad"'s impertinence. Finally, the end of semester comes, the students have right to estimate the teacher. That's the revenge moment, watashi thought.

Each student can give an integer mark form 1 to N to the teacher he/she is estimating. A teacher's rating is the average of marks given by students rounded to 0.1 (for example, 8.34 is rounded to 8.3, and 8.65 and 8.68 are rounded to 8.7). watashi knows "Satan. ChenTooBad" has been valued by M visitors and its current rating is K (rounded).

If a teacher's rating is not greater than L, he/she will be fired. Evil watashi wants to drag "Satan. ChenTooBad" out of his university as the final revenge.

Now watashi only knows the four numbers, can you help watashi to determine how many votes watashi must cast in order to achieve the revenge (assure that Satan will be fired).

Input

Each block has only one line. It contains four numbers N, K, L and M. The numbers K, L are given with one fractional digit. 1 <= N <= 100. 1 <= K, L <= N. 1 <= M <= 1000000.

You can make sure that the input is always valid (K is achievable by M visitors).

Output

Output the minimal number of estimates that guarantee that "Satan. ChenTooBad "will be fired. If it is impossible to achieve, just output "-1".

Sample Input

10 5.1 4.6 50
Sample Output

7

  • 写回答

2条回答 默认 最新

  • threenewbee 2017-04-10 15:49
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 远程桌面文档内容复制粘贴,格式会变化
  • ¥15 关于#java#的问题:找一份能快速看完mooc视频的代码
  • ¥15 这种微信登录授权 谁可以做啊
  • ¥15 请问我该如何添加自己的数据去运行蚁群算法代码
  • ¥20 用HslCommunication 连接欧姆龙 plc有时会连接失败。报异常为“未知错误”
  • ¥15 网络设备配置与管理这个该怎么弄
  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题