为什么#9过不了?各位大佬救命

P5707 【深基2.例12】上学迟到

jiaojunyao @ 2024-05-20 16:38:53

#include<bits/stdc++.h>
using namespace std;
struct jjy_time{
    int hour;
    int minute;
};
jjy_time jjy_t[2];
int main(){
    long s,v;
    cin>>s>>v;
    long t=s/v;
    t+=11;
    jjy_t[0].hour=8;
    jjy_t[0].minute=0;
    jjy_t[0].minute-=t;

    for(int i=0;i<=24;i++){
    if(jjy_t[0].minute>=60){
        jjy_t[0].hour+=1;
        jjy_t[0].minute-=60;
    }
        if(jjy_t[0].minute<0){
        jjy_t[0].hour-=1;
        jjy_t[0].minute+=60;
    }}
    if(jjy_t[0].hour<0){
        jjy_t[0].hour+=24;
    }

    if(jjy_t[0].hour<10){
        cout<<"0"<<jjy_t[0].hour;
    }else{
        cout<<jjy_t[0].hour;
    }       
    cout<<":";  
    if(jjy_t[0].minute<10){
                cout<<"0"<<jjy_t[0].minute;
    }else{
        cout<<jjy_t[0].minute;
    }   
    return 0;
}

|