HDU 6651 Final Exam

hdu题面

  • Time limit 2000 ms
  • Memory limit 524288 kB
  • OS Windows

吐槽

比赛时候晕死了……

解题思路

先留坑

源代码

#include<cmath>
#include<cstdio>
int T;
long long n,m,k;
int main()
{
	scanf("%d",&T);
	while(T--)
	{
		scanf("%lld%lld%lld",&n,&m,&k);
		printf("%lld
",(k-1)*(long long)ceil(1.0*(m+1)/(n-k+1)) +1+m);
	}
	return 0;
}

原文地址:https://www.cnblogs.com/wawcac-blog/p/11347303.html