Codefoces 387A George and Sleep(水题)
来源:互联网 发布:网络配音圈子 编辑:程序博客网 时间:2024/05/23 19:15
题目链接:Codefoces 387A George and Sleep
题目大意:给出一个时间,然后往前推一个时间长度,给出那时的时间。
解题思路:水题,注意借位即可。
#include <stdio.h>#include <string.h>int main() {int h, m, hh, mm;scanf("%d:%d", &h, &m);scanf("%d:%d", &hh, &mm);int x, y;if (mm > m) {h--, m += 60;}y = m - mm;x = (h + 24 - hh) % 24;printf("%02d:%02d\n", x, y);return 0;}
0 0
- Codefoces 387A George and Sleep(水题)
- A. George and Sleep
- A. George and Sleep
- CodeForces 387A George and Sleep
- CodeForces 387A George and Sleep
- CodeForces 387A George and Sleep
- Codeforces 387A George and Sleep
- George and Sleep
- . George and Sleep
- codeforces George and Sleep
- George and Sleep
- George and Sleep
- Codeforces Round #227 (Div. 2)A. George and Sleep
- Codeforces Round #227 (Div. 2)---A. George and Sleep
- Codeforces 467A George and Accommodation(水题)
- A. George and Accommodation
- 467A. George and Accommodation
- 467A - George and Accommodation
- [贪心]cf225cMilking cows
- 2013年吴超的个人总结
- Java基础-容器
- 【并查集】hdu1272
- startActivityForResult与onActivityResult
- Codefoces 387A George and Sleep(水题)
- 巴巴运动重做小记(40-50)
- 什么是敏捷软件测试
- 敏捷软件测试的七个关键成功要素
- Ubuntu mount命令用法详解
- (五)泛型
- Codeforces 387B George and Round(贪心)
- poj2151
- android4.4广播机制(下)