3,5错(帮帮蒟蒻)
查看原帖
3,5错(帮帮蒟蒻)
1383564
DDV1楼主2024/8/8 15:35
#include<bits/stdc++.h>
using namespace std;
int main(){
	int s,v,add=480;
	cin>>s>>v;
	int y;
	if(s%v==0)
	y=s/v;
	else 
	y=s/v+1;
	y=y+10;
	int H=y/60,M=y%60; 
	if(y<=480){
		if(M==0)
		cout<<"0"<<8-H<<":00";
		else
		cout<<"0"<<7-H<<":"<<60-M;
	} 
	if(y>480){
		if(M==0 and 24-(H-8)>=10)
		cout<<24-(H-8)<<":00";
		if(M==0 and 24-(H-8)<10)
		cout<<"0"<<24-(H-8)<<":00";
		if(M!=0 and 24-(H-8+1)>=10 and 60-M>=10)
		cout<<24-(H-8+1)<<":"<<60-M;
		if(M!=0 and (24-(H-8+1)<10) and 60-M>=10)
		cout<<"0"<<24-(H-8+1)<<":"<<60-M<<endl;

		if(M!=0 and 24-(H-8+1)>=10 and 60-M<10)
		cout<<24-(H-8+1)<<":"<<"0"<<60-M;
		if(M!=0 and (24-(H-8+1)<10) and 60-M<10)
		cout<<"0"<<24-(H-8+1)<<":"<<"0"<<60-M<<endl;       
    }
	return 0;
}

orz

2024/8/8 15:35
加载中...