标签:style blog io os sp 2014 on c log
【题意简述】:输入现在的时间,输出此时钟敲了多少次。
【分析】:看好题目,给出映射关系就好。
//220K 0Ms #include<iostream> using namespace std; int main() { int t; int h,m; int a[] = {12,13,14,15,16,17,18,19,20,21,22,23,24,1,2,3,4,5,6,7,8,9,10,11}; cin>>t; while(t--) { scanf("%d:%d",&h,&m); if(m!=0) cout<<0<<endl; else { cout<<a[h]<<endl; } } return 0; }
标签:style blog io os sp 2014 on c log
原文地址:http://blog.csdn.net/u013749862/article/details/39524435