#include <stdio.h> int main() { int hour = 0; int mintue = 0; int duringtime = 0;//睡眠时间 scanf("%d:%d %d", &hour, &mintue, &duringtime); hour = (hour + duringtime / 60) % 24;//显示小时数 mintue = mintue + duringtime % 60;//显示分钟数 if (mintue >= 60) { mintue = mintue % 60; hour = hour + 1; } printf("%02d:%02d\n", hour, mintue);//左边补零 return 0; }