1 条题解
-
0
#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; }
- 1
信息
- ID
- 1149
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 2
- 标签
- (无)
- 递交数
- 108
- 已通过
- 63
- 上传者