题干:

Valeric and Valerko missed the last Euro football game, so they decided to watch the game's key moments on the Net. They want to start watching as soon as possible but the connection speed is too low. If they turn on the video right now, it will "hang up" as the size of data to watch per second will be more than the size of downloaded data per second.

The guys want to watch the whole video without any pauses, so they have to wait some integer number of seconds for a part of the video to download. After this number of seconds passes, they can start watching. Waiting for the whole video to download isn't necessary as the video can download after the guys started to watch.

Let's suppose that video's length is c seconds and Valeric and Valerko wait tseconds before the watching. Then for any moment of time t0, t ≤ t0 ≤ c + t, the following condition must fulfill: the size of data received in t0 seconds is not less than the size of data needed to watch t0 - t seconds of the video.

Of course, the guys want to wait as little as possible, so your task is to find the minimum integer number of seconds to wait before turning the video on. The guys must watch the video without pauses.

Input

The first line contains three space-separated integers ab and c (1 ≤ a, b, c ≤ 1000, a > b). The first number (a) denotes the size of data needed to watch one second of the video. The second number (b) denotes the size of data Valeric and Valerko can download from the Net per second. The third number (c) denotes the video's length in seconds.

Output

Print a single number — the minimum integer number of seconds that Valeric and Valerko must wait to watch football without pauses.

Examples

Input

4 1 1

Output

3

Input

10 3 2

Output

5

Input

13 12 1

Output

1

Note

In the first sample video's length is 1 second and it is necessary 4 units of data for watching 1 second of video, so guys should download 4 · 1 = 4 units of data to watch the whole video. The most optimal way is to wait 3 seconds till 3 units of data will be downloaded and then start watching. While guys will be watching video 1 second, one unit of data will be downloaded and Valerik and Valerko will have 4 units of data by the end of watching. Also every moment till the end of video guys will have more data then necessary for watching.

In the second sample guys need 2 · 10 = 20 units of data, so they have to wait 5 seconds and after that they will have 20 units before the second second ends. However, if guys wait 4 seconds, they will be able to watch first second of video without pauses, but they will download 18 units of data by the end of second second and it is less then necessary.

题目大意:

输入a,b,c,第一个数字(a)表示观看一秒钟视频所需的数据大小。第二个数字(b)表示每秒可以从网络下载的数据大小。第三个数字(c)表示视频的长度(以秒为单位)。问我如果想中间不停顿的播放,则至少需要等他下载多少秒再开始播放?

解题报告:

菜啊,,想错式子了啊刚开始。一直想推一个追及的式子,结果用时间的等式或者用下载量的等式,最后都推出来类似1=1的东西,,,崩溃,,后来发现不能这么看,因为提前几秒下载的时间你是不知道的啊。其实设提前下载t秒,一共视频是c秒,这个告诉你了,所以t*b+c*b=a*c就可以了。。。。并且需要向上取整。。。水题

AC代码:

#include<bits/stdc++.h>
using namespace std;int main()
{int a,b,c;double x;cin>>a>>b>>c;x=a*c-b*c;printf("%d\n",(int)ceil(x/b));return 0 ;
}

【CodeForces - 195A】Let's Watch Football (追及问题,模拟)相关推荐

  1. 【CodeForces - 569A】Music (数学公式化简,模拟追及问题)

    题干: Little Lesha loves listening to music via his smartphone. But the smartphone doesn't have much m ...

  2. CodeForces - 1543D2 RPD and Rap Sheet (Hard Version)(交互+模拟)

    题目链接:点击查看 题目大意:交互题猜密码,设原密码为 xxx,猜的密码为 yyy,如果没猜到,密码会自适应变成 zzz,满足 x⊕z=yx \oplus z=yx⊕z=y ,最多猜 nnn 次,对于 ...

  3. Codeforces Round #743 (Div. 2) D. Xor of 3 模拟 + 构造

    传送门 文章目录 题意: 思路: 题意: 给你一个010101序列aaa,定义一次操作是选择一个[1,n−2][1,n-2][1,n−2]范围内的下表,将ai,ai+1,ai+2a_i,a_{i+1} ...

  4. Codeforces Round #656 (Div. 3) F. Removing Leaves 贪心 + 模拟

    传送门 文章目录 题意: 思路: 题意: 思路: 首先有一个贪心策略就是每次都找一个叶子节点最多的点,让后删掉他的kkk个叶子节点,现在我们就来考虑如何模拟这个过程. 我们整一个vector<s ...

  5. *【CodeForces - 195B】After Training (多解,模拟)

    题干: After a team finished their training session on Euro football championship, Valeric was commissi ...

  6. Codeforces 216D Spider#39;s Web 树状数组+模拟

    题目链接:http://codeforces.com/problemset/problem/216/D 题意: 对于一个梯形区域,假设梯形左边的点数!=梯形右边的点数,那么这个梯形为红色.否则为绿色, ...

  7. Codeforces Round #Pi (Div. 2) B. Berland National Library 模拟

    B. Berland National Library Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/conte ...

  8. codeforces 792CDivide by Three(两种方法:模拟、动态规划

    传送门:https://codeforces.com/problemset/problem/792/C 题意:给你一个字符串,要求让你删除最少个数的元素,使得最终答案是没有前导0并且是3的倍数. 题解 ...

  9. Codeforces Round #444 (Div. 2) C.Solution for Cube 模拟

    向题解低头,向大佬低头(.﹏.)orz--模拟也不能乱模啊--要好好分析题意,简化简化再简化orz敲黑板 六个面的魔方,能一步还原的情况一定是只有2个面是单色,其余四个面,每个面2种颜色,而且不会出现 ...

最新文章

  1. mysql解析运行时间_分析 MySQL 语句运行时间
  2. mongodb 新增字段
  3. 前端如何让倒计时更准确
  4. StringBuilder字符串缓冲区
  5. 跳转定义_HTML中的超级链接和锚点跳转
  6. 为什么有的人有心事就容易失眠?
  7. linux权限设定的判定,linux中如何通过脚本判定文件的群组权限
  8. String 转 jsonObject
  9. 随身助手271个可用api接口网站php源码(随身助手API)
  10. linux虚拟文件系统(二)-ext4文件系统结构
  11. 虚拟机运行出现蓝屏解决 win11
  12. js重点基础学习笔记
  13. opengl——绘制一个点
  14. 10分钟了解何为ECharts
  15. 人工智能对生活的影响
  16. 实验记录 | 8/14
  17. Docker Hub Automated Build with GitHub
  18. 人生苦短,快学python(python可以做什么)
  19. MFC不同窗口之间传递数据
  20. 达芬奇密码 第七十一章

热门文章

  1. [密码学基础][每个信息安全博士生应该知道的52件事][Bristol Cryptography][第3篇]影响计算能力和存储能力的因素
  2. mysql binlog 备份_做好mysql运维,必须熟练掌握备份和恢复,实战一次不行多来几次...
  3. java 窗口 单例_java单例模式实现面板切换
  4. linux tcp header更改,Linux Netfilter中修改TCP/UDP Payload的方法
  5. 回溯——伯努利装错信封问题
  6. app推送以及提示音java,springboot 整合 Jpush 极光推送
  7. arduino代码_arduino智能小车项目——01、配件介绍及代码部分教程
  8. python人工智能原理及其应用_人工智能原理与实践:基于Python语言和TensorFlow
  9. Asterisk拨号方案常用函数说明
  10. numpy读取csv_Numpy——IO操作与数据处理