求解,90
查看原帖
求解,90
1458444
lryjs楼主2024/10/24 22:12
#include<stdio.h>
int main()
{
	int s,t,v,h=8,m=0;
	scanf("%d%d",&s,&v);
	if (s % v != 0)
		t = s / v + 1;
	else
		t = s / v;
	while (m < (t + 10))
	{
		h--;
		m += 60;
		if (h == 0)
			h = 24;
	}
	m = m -( t+ 10);
	if(h<10&&m>=10)
	printf("0%d:%d\n",h, m);
	else if(h>=10&&m<10)
		printf("%d:0%d\n", h, m);
	else if(h<10&&m<10)
		printf("0%d:0%d\n",h,m);
	else
		printf("%d:%d\n", h, m);
	return 0;
}
2024/10/24 22:12
加载中...