90#9求解
查看原帖
90#9求解
1419017
z1443888087楼主2024/8/10 16:38

代码如下```cpp

#include<iostream>
using namespace std;
int main(){
    int h,s,v,m,t,a;
    a=32*60;
    cin>>s>>v;
   if(s/v==0){
       t=s/v+10;
   }
   else{
       t=s/v+11;
   }
    a-=t;
    if(a>=24*60)a%=24*60;
    h=a/60;
    m=a%60;
    if(h<10){
        cout<<"0"<<h;
    }
    else{
        cout<<h;
    }
    cout<<":";
    if(m<10){
        cout<<"0"<<m;
    }
    else{
        cout<<m;
    }
}
2024/8/10 16:38
加载中...