求助!为什么会这样?

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

一个代码 ```cpp #include<bits/stdc++.h> using namespace std; long tim,s,v,xiaoshi,fenzhong; int main(){ cin>>s>>v; if(s%v) tim=11+s/v; else tim=10+s/v; xiaoshi=tim/60; fenzhong=tim%60; xiaoshi=7-xiaoshi; fenzhong=60-fenzhong; if(xiaoshi<0) xiaoshi+=24; if(xiaoshi<10) cout<<"0"<<xiaoshi<<":"; else cout<<xiaoshi<<":"; if(fenzhong==60) cout<<"00"<<endl; else if(fenzhong<10) cout<<"0"<<fenzhong<<endl; else cout<<fenzhong<<endl; return 0; } ```
by wininaction @ 2023-08-01 12:45:28


|