80分,求助
查看原帖
80分,求助
1490617
xdacmdcj楼主2024/10/21 22:01
#include<iostream>
using namespace std;
int main(){
    int s,v;
    cin>>s>>v;
    int t1,t2;
    t2=10;
    int t;
    int a,b;
    if((s%v)==0){
        t1=s/v;
        t=t1+t2;
        if(t>480){
            if(t>1320&&t<=1440){
                cout<<"0"<<a<<":"<<b<<endl;
            }
            a=23-(t/60-8);
            b=60-t%60;
            cout<<a<<":"<<b<<endl;
            
        }
        if(t<=480){
            a=7-(t/60);
            b=60-(t%60);
            cout<<"0"<<a<<":"<<b<<endl;
        }
    }
    if(s%v!=0){
        t1=s/v+1;
        t=t1+t2;
        if(t>480){
        if(t>1320&&t<=1440){
                cout<<"0"<<a<<":"<<b<<endl;
            }
            a=23-(t/60-8);
            b=60-t%60;
            cout<<a<<":"<<b<<endl;
        }
        if(t<=480){
            a=7-(t/60);
            b=60-(t%60);
            cout<<"0"<<a<<":"<<b<<endl;
        }
    }
    return 0;
}
2024/10/21 22:01
加载中...