70分求助
查看原帖
70分求助
1013950
__youzimo2014__楼主2023/8/28 11:22
//
//  main.cpp
//  上学迟到
//
//  Created by 游子墨 on 2023/5/29.
//

#include <stdio.h>

#include <math.h>

int main(int argc, const char * argv[]) {
    // insert code here...
    unsigned s, u;
    scanf("%d %d", &s, &u);
    double WalkingTime = ceil(1.0 * s / u) + 10.0;
    double setOutTime = 480 - WalkingTime;
    unsigned short hours = setOutTime / 60;
    unsigned short min = setOutTime - (hours * 60);
    printf("%02d:%02d", hours, min);
    return 0;
}
2023/8/28 11:22
加载中...