yuzehao3 @ 2024-11-30 18:08:04
前3AC,其他全WA
#include <bits/stdc++.h>
using namespace std;
int h=8,m=0,u,t;
double s;
int main(){
cin>>s>>u;
s=s/u;
s=ceil(s);
if((s+10)/60){
h--;
m=60-s-10;
}else{
h=h-ceil((s+10)/60);
m=60-int(s+10)%60;
}
if(h-10<0){
cout<<0<<h;
}else{
cout<<h;
}
cout<<':';
if(m-10<0){
cout<<0<<m;
}else{
cout<<m;
}
return 0;
}
by lizimu0718 @ 2024-12-01 14:17:39
#include<iostream>
using namespace std;
int main()
{
int s,u;
cin>>s>>u;
int t=s/u+10;
if(s%u!=0) t++;
int time=8*60;//先都换成分为单位,再换回来,不然容易乱
time-=t;
if(time<0) time=24*60+time;//不会超过一天,但是可能超过八小时,在前一天(离谱),不加判断只有70分
int h=time/60,min=time%60;
if(h<10) cout<<"0";
cout<<h<<":";
if(min<10) cout<<"0";
cout<<min;
return 0;
}
希望对你有用
by lizimu0718 @ 2024-12-06 21:17:01
求互关(冒险等级45,我有好多朋友也是温迪厨)