求助大佬,70分!
查看原帖
求助大佬,70分!
1066636
QianMengxun楼主2023/10/17 20:04
#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;

int c(double x)
{
	if (x == int(x))	return x;
	else	return x+1;
}

int main()
{
    double s,v;
	cin >> s >> v;
	int t = c(s/v*1.0)+10;	//向上取整+倒垃圾 
	int x = 8,y = 0;
	y -= t;
	while (y < 0)
	{
		x--;	//借位 
		y+=60;
	}
	printf("%02d:%02d",x,y);
    return 0;
}
2023/10/17 20:04
加载中...