c++求助
查看原帖
c++求助
916513
REautomaticmachine楼主2022/12/27 21:15

大佬们看看,搞不懂了,就对了30

#include <bits/stdc++.h>

using namespace std;

int main()
{double s,v;
int g=7;
cin>>s>>v;
double t=s/v;
int time=50-t;
if(time<0)
{
    g--;
   time+=60;

}
if(time>=10){
    printf("0%d:%d",g,time);
}
else
    printf("0%d:0%d",g,time);
    return 0;
}

2022/12/27 21:15
加载中...