求助大佬,为什么80分
查看原帖
求助大佬,为什么80分
413500
熊凤山楼主2021/9/12 10:59
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
using namespace std;
int main(){
    int s,v;
    cin>>s>>v;
    int t;
    if(v>=s) t=1;
    else{
    	if(s%v==0) t=s/v;
    	else t=(s/v)+1;
	}
    t+=10;
    int time=480;
    time-=t;
    if(time>=0)
    cout<<"0"<<time/60<<":"<<time%60;
    else{
    	time+=24*60;
    	if(time/60>=10)
    	cout<<time/60<<":"<<time%60;
    	else
    	cout<<"0"<<time/60<<":"<<time%60;
	}
    return 0;
}
2021/9/12 10:59
加载中...