90悬关求捞QAQ
查看原帖
90悬关求捞QAQ
811437
littlewhite_楼主2024/7/21 09:36

真的想不到为啥了QAQ

记录

#include <bits/stdc++.h>
using namespace std;
int s,v,t1=10,t2=1920,a,m,h;
int main()
{
	scanf("%d %d",&s,&v);
	a=s%v;
	if (a) 
	{
		s-=a;
		t1+=s/v+1;
	}
	else t1+=s/v;
	t2-=t1;
	m=t2%60;
	t2-=m;
	h=t2/60;
	if(h>=24)
	{
		h-=24;	
		if(m>=10) printf("0%d:%d",h,m);
		else printf("0%d:0%d",h,m);
	} 
	else if(h>=12)
	{
		if(m>=10) printf("%d:%d",h,m);
		else printf("%d:0%d",h,m);
	}
	else
	{
		if(m>=10) printf("0%d:%d",h,m);
		else printf("0%d:0%d",h,m);
	}
	return 0;
} 
2024/7/21 09:36
加载中...