题解 | #小乐乐定闹钟#
小乐乐定闹钟
https://www.nowcoder.com/practice/0f7e422e12be4a7f9958ca2a82abc775
#include <stdio.h> int main() { int a,b,c; scanf("%d:%d %d",&a,&b,&c); printf("%02d:%02d\n",((a+c/60)+(b+c%60)/60)%24,(b+c%60)%60); return 0; }
小乐乐定闹钟
https://www.nowcoder.com/practice/0f7e422e12be4a7f9958ca2a82abc775
#include <stdio.h> int main() { int a,b,c; scanf("%d:%d %d",&a,&b,&c); printf("%02d:%02d\n",((a+c/60)+(b+c%60)/60)%24,(b+c%60)%60); return 0; }
相关推荐