10 条题解
-
3
-
#include<bits/stdc++.h> using namespace std; int main() { int s,v; cin>>s>>v; double x=s*1.0/v*1.0; int t=10+s/v; if(x>s/v||s/v<0) { t=t+1; } int h,y; if(t<=480) { h=(480-t)/60; y=(480-t)%60; if(h<10&&y>=10) { cout<<"0"<<h<<":"<<y<<endl; } else if(h<10&&y<10) { cout<<"0"<<h<<":"<<"0"<<y<<endl; } else if(h>=10&&y>=10) { cout<<h<<":"<<y<<endl; } } else if(t>480) { int u=t-480; h=u/60; if(h==0) { h=23; } else { h=23-h; } y=60-u%60; if(h<10&&y>=10) { cout<<"0"<<h<<":"<<y<<endl; } else if(h<10&&y<10) { cout<<"0"<<h<<":"<<"0"<<y<<endl; } else if(h>=10&&y>=10) { cout<<h<<":"<<y<<endl; } } return 0; }
-
0
rc247huangyushen1 LV 5 @ 1 周前
#include<bits/stdc++.h> using namespace std; int main() { int s,v; cin>>s>>v; double x=s*1.0/v*1.0; int t=10+s/v; if(x>s/v||s/v<0) { t=t+1; } int h,y; if(t<=480) { h=(480-t)/60; y=(480-t)%60; if(h<10&&y>=10) { cout<<"0"<<h<<":"<<y<<endl; } else if(h<10&&y<10) { cout<<"0"<<h<<":"<<"0"<<y<<endl; } else if(h>=10&&y>=10) { cout<<h<<":"<<y<<endl; } } else if(t>480) { int u=t-480; h=u/60; if(h==0) { h=23; } else { h=23-h; } y=60-u%60; if(h<10&&y>=10) { cout<<"0"<<h<<":"<<y<<endl; } else if(h<10&&y<10) { cout<<"0"<<h<<":"<<"0"<<y<<endl; } else if(h>=10&&y>=10) { cout<<h<<":"<<y<<endl; } } return 0; }
-
-
0
#include<bits/stdc++.h> using namespace std; int main(){ int s,u,sum=1,n=24; cin>>s>>u; int v; v=s*1.0/u+1; if(v=40){ cout<<"07:"<<50-v; } if(v%7B%0Acout%3C%3C%2207:%22%3C%3C50-v;%0A%7D%0Aif(v)40&&v=50){ cout<<"07:0"<<50-v; } if(v%7B%0Acout%3C%3C%2207:0%22%3C%3C50-v;%0A%7D%0Aif(v)50){ if(v-50=50){ cout<<"06:"<<60-v+50-1; } if(v-50%7B%0Acout%3C%3C%2206:%22%3C%3C60-v+50-1;%0A%7D%0Aif(v-50)50&&v-50=60){ cout<<"06:0"<<60-v+50-1; } if(v-50%7B%0Acout%3C%3C%2206:0%22%3C%3C60-v+50-1;%0A%7D%0Aif(v-50)60){ v=v-50-60; for(int i=1;i<=n;i++){ v=v-60; sum++; if(v<=60&&sum<=7&&v<=50){ cout<<"0"<<7-sum<<":" <<60-v-1; } if(v<=60&&v>50&&sum<=7){ cout<<"0"<<7-sum<<":0" <<60-v-1; } if(v<=60&&sum>7&&v<=50){ cout<<"0"<<24-sum+7<<":" <<60-v-1; } if(v<=60&&sum>7&&v>50){ cout<<"0"<<24-sum+7<<":0" <<60-v-1; } } } } return 0; } 只有30
-
0
#include<bits/stdc++.h> using namespace std; int main() { int s,v; cin>>s>>v; double x=s*1.0/v*1.0; int t=10+s/v; if(x>s/v||s/v<0) { t=t+1; } int h,y; if(t<=480) { h=(480-t)/60; y=(480-t)%60; if(h<10&&y>=10) { cout<<"0"<<h<<":"<<y<<endl; } else if(h<10&&y<10) { cout<<"0"<<h<<":"<<"0"<<y<<endl; } else if(h>=10&&y>=10) { cout<<h<<":"<<y<<endl; } } else if(t>480) { int u=t-480; h=u/60; if(h==0) { h=23; } else { h=23-h; } y=60-u%60; if(h<10&&y>=10) { cout<<"0"<<h<<":"<<y<<endl; } else if(h<10&&y<10) { cout<<"0"<<h<<":"<<"0"<<y<<endl; } else if(h>=10&&y>=10) { cout<<h<<":"<<y<<endl; } } return 0; }
-
0
#include<bits/stdc++.h> using namespace std; int main() { int s,v; cin>>s>>v; double x=s*1.0/v*1.0; int t=10+s/v; if(x>s/v||s/v<0) { t=t+1; } int h,y; if(t<=480) { h=(480-t)/60; y=(480-t)%60; if(h<10&&y>=10) { cout<<"0"<<h<<":"<<y<<endl; } else if(h<10&&y<10) { cout<<"0"<<h<<":"<<"0"<<y<<endl; } else if(h>=10&&y>=10) { cout<<h<<":"<<y<<endl; } } else if(t>480) { int u=t-480; h=u/60; if(h==0) { h=23; } else { h=23-h; } y=60-u%60; if(h<10&&y>=10) { cout<<"0"<<h<<":"<<y<<endl; } else if(h<10&&y<10) { cout<<"0"<<h<<":"<<"0"<<y<<endl; } else if(h>=10&&y>=10) { cout<<h<<":"<<y<<endl; } } return 0; }
-
0
#include<bits/stdc++.h> using namespace std; int main() { int s,v; cin>>s>>v; double x=s*1.0/v*1.0; int t=10+s/v; if(x>s/v||s/v<0) { t=t+1; } int h,y; if(t<=480) { h=(480-t)/60; y=(480-t)%60; if(h<10&&y>=10) { cout<<"0"<<h<<":"<<y<<endl; } else if(h<10&&y<10) { cout<<"0"<<h<<":"<<"0"<<y<<endl; } else if(h>=10&&y>=10) { cout<<h<<":"<<y<<endl; } } else if(t>480) { int u=t-480; h=u/60; if(h==0) { h=23; } else { h=23-h; } y=60-u%60; if(h<10&&y>=10) { cout<<"0"<<h<<":"<<y<<endl; } else if(h<10&&y<10) { cout<<"0"<<h<<":"<<"0"<<y<<endl; } else if(h>=10&&y>=10) { cout<<h<<":"<<y<<endl; } } return 0; }
-
0
#include<bits/stdc++.h> using namespace std; int main() { int s,v; cin>>s>>v; double x=s*1.0/v*1.0; int t=10+s/v; if(x>s/v||s/v<0) { t=t+1; } int h,y; if(t<=480) { h=(480-t)/60; y=(480-t)%60; if(h<10&&y>=10) { cout<<"0"<<h<<":"<<y<<endl; } else if(h<10&&y<10) { cout<<"0"<<h<<":"<<"0"<<y<<endl; } else if(h>=10&&y>=10) { cout<<h<<":"<<y<<endl; } } else if(t>480) { int u=t-480; h=u/60; if(h==0) { h=23; } else { h=23-h; } y=60-u%60; if(h<10&&y>=10) { cout<<"0"<<h<<":"<<y<<endl; } else if(h<10&&y<10) { cout<<"0"<<h<<":"<<"0"<<y<<endl; } else if(h>=10&&y>=10) { cout<<h<<":"<<y<<endl; } } return 0; }
-
0
#include<bits/stdc++.h> using namespace std;
int main() { int s,v; cin>>s>>v; double x=s1.0/v1.0; int t=10+s/v; if(x>s/v||s/v<0) { t=t+1; } int h,y; if(t<=480) { h=(480-t)/60; y=(480-t)%60; if(h<10&&y>=10) { cout<<"0"<<h<<":"<<y<<endl; } else if(h<10&&y<10) { cout<<"0"<<h<<":"<<"0"<<y<<endl; } else if(h>=10&&y>=10) { cout<<h<<":"<<y<<endl; } } else if(t>480) { int u=t-480; h=u/60; if(h==0) { h=23; } else { h=23-h; } y=60-u%60; if(h<10&&y>=10) { cout<<"0"<<h<<":"<<y<<endl; } else if(h<10&&y<10) { cout<<"0"<<h<<":"<<"0"<<y<<endl; } else if(h>=10&&y>=10) { cout<<h<<":"<<y<<endl; } } return 0; }
-
0
#include<bits/stdc++.h> using namespace std; int mian(){
int s,v,n,t,answer,ans1,ans2; cin>>s>>v; n=(8+24)*60; answer=s/v+1; if(s%v!=0) s/v++; t=n-10-answer; if(t>=24*60) t-=24*60; ans1=t/60; ans2=t%60; if(ans1<10) {if (ans2<10) cout<<0<<ans1<<":"<<0<<ans2<<endl; else cout<<0<<ans1<<":"<<ans2<<endl; } else{ if(ans2<10) cout<<ans1<<":"<<0<<ans2<<endl; else cout<<ans1<<":"<<ans2<<endl; }return 0; }
-
-1
#include <bits/stdc++.h> using namespace std; int main() { int s,v,hh,mm; double m0; int m,m1,m2,a; cin>>s>>v; m0=s*1.0/v*1.0; m=ceil(m0); m1=m+10; if(m1>480) { m2=m1-480; a=24*60-m2; hh=a/60; mm=a%60; } else if(m1<480) { m2=480-m1; hh=m2/60; mm=m2%60; } else { m2=0; hh=0; mm=0; } if(hh<10) { cout<<"0"<<hh; } else { cout<<hh; } cout<<":"; if(mm<10) { cout<<"0"<<mm; } else { cout<<mm; } return 0; }
- 1
信息
- ID
- 609
- 时间
- 1000ms
- 内存
- 125MiB
- 难度
- 5
- 标签
- (无)
- 递交数
- 261
- 已通过
- 95
- 上传者