RT,我的代码:
#include<iostream>
#include<sstream>
using namespace std;
int t,s,v,h=7,m=59;
string sh,sm;
int main(){
cin>>s>>v;
t=s/v+10;
for (int i=0;i<t;i++){
m-=1;
if(m<0){
m=59;
h-=1;
if(h<0){
h=23;
}
}
}
if(h<10){
sh='0'+to_string(h);
}else{
sh=to_string(h);
}
if(m<10){
sm='0'+to_string(m);
}else{
sm=to_string(m);
}
cout<<sh<<":"<<sm;
}
错误:
Wrong Answer.wrong answer On line 1 column 5, read 2, expected 3