poj 2840 Big Clock
来源:互联网 发布:桂圆淘宝 编辑:程序博客网 时间:2024/04/28 04:31
本题没有什么难点,但是用我这种 mod 的方法有一个陷阱,这就是12:00的时候会响0次!事实上会响24次,于是就单独处理12点整。开始提交错了2次,总的来说很顺利,没有浪费太多的时间,就是要注意细节,不然比赛的时候就白白罚时了。。。发现不了问题,数据量又不大的时候,打表比较有效
#include <stdio.h>int main(){//freopen("in.txt","r",stdin);int T;scanf("%d",&T);int H,M;char point;while(T--){scanf("%d%c%d",&H,&point,&M);//本题关键在此的整形、字符处理//printf("%d%c%d\n\n",H,point,M);//okif(M!=0)printf("0\n");else{if(H==12)printf("24\n");elseprintf("%d\n",(H+12)%24);}}return 0;}
- poj 2840 Big Clock
- poj 2840 Big Clock
- Poj 2840 Big Clock
- POJ 2840 Big Clock
- POJ 2840 Big Clock(水题)
- POJ 2840 Big Clock G++
- POJ 2840 Big Clock 解题报告
- POJ 2840 Big Clock(水~)
- POJ 2840 Big Clock(我的水题之路——水,钟)
- poj2840 Big Clock
- Binary Clock poj 3789
- POJ 2815 Context-Free Clock
- POJ 1423 Big Number
- POJ 1423 Big Number
- POJ 1423 Big Number
- poj 1423 Big Number
- poj 1423 big number
- POJ 1423 Big Number
- Microsoft Enterprise Library 5.0 系列教程(三) Validation Application Block (初级)
- 简易文本编辑器分析
- strchr
- C++图结构的图结构操作示例
- U-Boot启动过程完全分析
- poj 2840 Big Clock
- 接口
- 有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少?
- Microsoft Enterprise Library 5.0 系列教程(三) Validation Application Block (高级)
- 无线高清显示技术
- 下列应用程序,产生两个组合框,一个可以选择月份,一个可以选择2000~2009年之间的年份。
- 自动刷新页面
- Spring3整合Hibernate4 Annotation详细图文教程
- 问题1