zbr121115 @ 2024-07-07 15:34:37
大佬帮帮忙orz
#include<bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int s,v,c,t1,t,o;
cin>>s>>v;
if (v>=s){
c=11;
}else if (s%v!=0){
c=s/v+1+10;
}else{
c=s/v+10;
}
t=c%1440;
if (t>=480){
t=1440-(t-480);
cout<<"0"<<t/60<<":"<<t%60;
}else{
t=480-t;
cout<<"0"<<t/60<<":"<<t%60;
}
return 0;
}
本蒟蒻太cai误喷
by zbr121115 @ 2024-07-07 15:42:54
@zbr121115 本蒟蒻又改了一下现在80分
#include<bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int s,v,c,t1,t,o;
cin>>s>>v;
if (v>=s){
c=11;
}else if (s%v!=0){
c=s/v+1+10;
}else{
c=s/v+10;
}
t=c%1440;
if (t>=480){
t=1440-(t-480);
if (t/60<10){
cout<<"0"<<t/60<<":"<<t%60;
}else{
cout<<t/60<<":"<<t%60;
}
}else{
t=480-t;
if (t/60<10){
cout<<"0"<<t/60<<":"<<t%60;
}else{
cout<<t/60<<":"<<t%60;
}
}
return 0;
}