我在修改后又参照了题解,却总是过不了
以下是我的代码,请各路大佬指点:
#include <bits/stdc++.h>
using namespace std;
int main(){
int s,v,h,a,b;
double n;
const int m=24*60+8*60;
cin>>s>>v;
n=s/v+10;
h=m-n;
if(h>=24*60){h-=24*60;}
a=h/60;
b=h%60;
if(a<10){
if(b<10)cout<<"0"<<a<<":0"<<b;
else cout<<"0"<<a<<":"<<b;}else
if(b<10)cout<<a<<":0"<<b;
else cout<<a<<":"<<b;
return 0;}