1 条题解

  • 0
    @ 2025-10-20 9:33:35
    #include <stdio.h>
    
    int main() {
        int a, b, c, d;
        // 读取输入
        scanf("%d %d %d %d", &a, &b, &c, &d);
        
        // 转换为分钟数
        int start_minutes = a * 60 + b;
        int end_minutes = c * 60 + d;
        
        // 计算总分钟差
        int total_minutes = end_minutes - start_minutes;
        
        // 转换为小时和分钟
        int hours = total_minutes / 60;
        int minutes = total_minutes % 60;
        
        // 输出结果
        printf("%d %d\n", hours, minutes);
        
        return 0;
    }
    

    信息

    ID
    1149
    时间
    1000ms
    内存
    256MiB
    难度
    2
    标签
    (无)
    递交数
    105
    已通过
    62
    上传者