编程介的小学生 2017-03-27 05:41 采纳率: 20.3%
浏览 771
已采纳

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-05 15:42
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥60 用visual studio编写程序,利用间接平差求解水准网
  • ¥15 Llama如何调用shell或者Python
  • ¥20 谁能帮我挨个解读这个php语言编的代码什么意思?
  • ¥15 win10权限管理,限制普通用户使用删除功能
  • ¥15 minnio内存占用过大,内存没被回收(Windows环境)
  • ¥65 抖音咸鱼付款链接转码支付宝
  • ¥15 ubuntu22.04上安装ursim-3.15.8.106339遇到的问题
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案