P5707 70分求助!!!错后三个点
查看原帖
P5707 70分求助!!!错后三个点
117403
1272707075zbx楼主2021/8/8 14:34
#include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
int main(){
    float s,v,t;
    int t1,h1,m1;
    cin>>s>>v;
    t=s/v+10;
    t1=ceil(t);
    m1=t1%60;
    h1=(t1-m1)/60;
    m1=60-m1;
    if(h1>=8)
        h1=24-(h1-8);
    else
        h1=7-h1;
    if(m1==60){
        h1++;
        m1=0;
    }
    printf("%02d:%02d",h1,m1);
    return 0;
    }

改了很多次还是错的

2021/8/8 14:34
加载中...