2013腾讯编程马拉松初赛第3场(3月23)(HDU 4515 HDU4516 HDU4517 HDU4518 HDU4519)
链接 :http://acm.hdu.edu.cn/showproblem.php?pid=4515
题解:由于水题,直接贴roro大牛的代码
#include <cstdio>#include <cmath>#include <iostream>using namespace std;int n, k, m;int main(){int t;scanf("%d", &t);while (t--){scanf("%d %d %d", &n, &k, &m);int ans;if (n >= m){double tmp = (double)n*k / m;ans = (int)(tmp+0.999999999);//向上取整}else{ans = k;}printf("%d\n", ans);}return 0;}