3,5错(帮帮蒟蒻)

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

```cpp #include<bits/stdc++.h> using namespace std; int main(){ double s,v,m; int n,a,t,b; cin>>s>>v; n=8*60+24*60; t=ceil(s/v)+10; n=n-t; if(n>=24*60) n-=24*60; b=n%60; a=n/60; if(a<10){ if(b<10) cout<<"0"<<a<<":0"<<b; else cout<<"0"<<a<<":"<<b; } else{ if(b<10) cout<<a<<":0"<<b; else cout<<a<<":"<<b; } return 0; } ```
by xhl_leo @ 2024-08-08 15:40:27


```cpp #include<bits/stdc++.h> using namespace std; double s,v,cnt; int ans,h,m,tmp,tot=8*60+24*60; int main() { scanf("%lf%lf",&s,&v); cnt=s/v; tmp=ceil(cnt); tmp+=10; tot-=tmp; if(tot>=24*60) tot-=24*60; h=tot%60; tot/=60; m=tot; printf("%02d:%02d",m,h); return 0; } ```
by linruicong @ 2024-08-08 15:41:45


求关
by xhl_leo @ 2024-08-08 15:42:00


求关
by linruicong @ 2024-08-08 15:43:24


@[xhl_leo](https://www.luogu.com.cn/user/1208985),已关
by linruicong @ 2024-08-08 15:44:21


```cpp #include<bits/stdc++.h> using namespace std; int main(){ int a=7,t,h,b; float c,s,v; cin>>s>>v; c=s/v; t=s/v; if(c-t>0){ t=t+1; } h=t/60; t=t%60; if(t>50){ t=t-50; b=60-t; a=6; a=a-h; } else{ b=50-t; a=a-h; } if(a<0){ a=24+a; if(a>=9) cout<<a<<":"<<b; } else if(b>=10) cout<<"0"<<a<<":"<<b; else cout<<"0"<<a<<":0"<<b; return 0; } ```
by dhc130223 @ 2024-08-09 21:41:03


|