Problem Description
Do you own an ID card?You must have a identity card number in your family's Household Register. From the ID card you can get specific  personal  information of everyone. The number has 18 bits,the first 17 bits contain special specially meanings:the first 6 bits represent the region you come from,then comes the next 8 bits which stand for your birthday.What do other 4 bits represent?You can Baidu or Google it. Here is the codes which represent the region you are in. However,in your card,maybe only 33 appears,0000 is replaced by other numbers. Here is Samuel's ID number 331004198910120036 can you tell where he is from?The first 2 numbers tell that he is from Zhengjiang Province,number 19891012 is his birthday date (yy/mm/dd).
 
Input
Input will contain 2 parts: A number n in the first line,n here means there is n test cases. For each of the test cases,there is a string of the ID card number.
 
Output
Based on the table output where he is from and when is his birthday. The format you can refer to the Sample Output.
 
Sample Input
1 330000198910120036
 
Sample Output
He/She is from Zhejiang,and his/her birthday is on 10,12,1989 based on the table.
#include <iostream>
#include <cstdio>
using namespace std; int main()
{
char data[];
int n;
cin>>n;
while(n--)
{
cin>>data;
cout<<"He/She is from ";
if(data[]==''&&data[]=='')
cout<<"Zhejiang,";
if(data[]==''&&data[]=='')
cout<<"Beijing,";
if(data[]==''&&data[]=='')
cout<<"Taiwan,";
if(data[]==''&&data[]=='')
cout<<"Hong Kong,";
if(data[]==''&&data[]=='')
cout<<"Macao,";
if(data[]==''&&data[]=='')
cout<<"Tibet,";
if(data[]==''&&data[]=='')
cout<<"Liaoning,";
if(data[]==''&&data[]=='')
cout<<"Shanghai,";
cout<<"and his/her birthday is on ";
printf("%c%c,%c%c,%c%c%c%c based on the table.\n",
data[],data[],data[],
data[],data[],data[],data[],data[]); }
return ;
}

HDU2629:Identity Card的更多相关文章

  1. Identity Card(水题)

    Identity Card Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) To ...

  2. Identity Card(hdu2629)

    输入方式:先输入一个整型,再输入不带空格未知长度/已知长度的字符串. 思考:用scanf_s()函数输入整型,再循环输入不带空格未知长度的字符串,用gets_s()函数. 注意:scanf_s()函数 ...

  3. hdu 2629 Identity Card (字符串解析模拟题)

    这题是一个字符串模拟水题,给12级学弟学妹们找找自信的,嘿嘿; 题目意思就是要你讲身份证的上的省份和生日解析出来输出就可以了: http://acm.hdu.edu.cn/showproblem.ph ...

  4. HDU 2629 Identity Card

    简单题 给出身份证号 判断住址 和出生年月 熟练字符串的操作 主要是string::substr(s, l)//s:起始位置 l长度 #include <iostream> #includ ...

  5. 杭电2629 Identity Card

    题目意思很简单,就是根据身份证号码来确定一个人的籍贯和生日,(然而我开始脑子抽了还以为还要根据奇数偶数判断男女233333). 然后我的暴力ac代码: #include <iostream> ...

  6. hdu2629Identity Card

    Problem Description Do you own an ID card?You must have a identity card number in your family's Hous ...

  7. startssl

    Validation Success You have successfully authenticated domain "xxx.com.cn".You will be abl ...

  8. Dwarves (有向图判环)

    Dwarves 时间限制: 1 Sec  内存限制: 64 MB提交: 14  解决: 4[提交][状态][讨论版] 题目描述 Once upon a time, there arose a huge ...

  9. ORM框架Hibernate (四) 一对一单向、双向关联映射

    简介 在上一篇博客说了一下多对一映射,这里再说一下一对一关联映射,这种例子在生活中很常见,比如一个人的信息和他的身份证是一对一.又如一夫一妻制等等. 记得在Java编程思想上第一句话是“一切皆对象”, ...

随机推荐

  1. CSU 1650 影魔大战

    简单题. 首先判断两个圆是否都与坐标轴相交,有一个不相交直接输出NO 剩下的情况都是相交的.让算一算四个交点.最后只有四种情况了. #include<cstdio> #include< ...

  2. Matches Puzzle Game

    Matches Puzzle Game 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5456 数位DP 首先我把C-A=B改为A+B=C(我觉得会简单 ...

  3. socket编程——一个简单的例子

    从一个简单的使用TCP例子开始socket编程,其基本步骤如下: server                                                  client ++++ ...

  4. 本地Fiddler传递XML格式数据,调试微信功能。

    一,调试关注和取消关注 User-Agent: Fiddler Host: localhost:4561Content-Type: application/json; charset=utf-8 Co ...

  5. radio的选中设置以及取值。

    前台:<input type=" id="tg" name="state"/> <a style="cursor:poin ...

  6. Spring Security(09)——Filter

    目录 1.1     Filter顺序 1.2     添加Filter到FilterChain 1.3     DelegatingFilterProxy 1.4     FilterChainPr ...

  7. ecshop里的$_CFG从哪来的

    以前经常有朋友问我, ecshop系统的$_CFG这个数组是从哪里来的,在哪里定义并赋值的.   下面就给大家说一下这个全局变量 $GLOBALS['_CFG']. ecshop里的 $_CFG数组主 ...

  8. Java 反射 Array动态创建数组

    Java 反射 Array动态创建数组 @author ixenos 注:java.lang.reflect.Array 是个反射工具包,全是静态方法,创建数组以多维数组为基准,一维数组只是特殊实现 ...

  9. HttpClient, HttpClientHandler, and WebRequestHandler介绍

    注:本文为个人学习摘录,原文地址:https://blogs.msdn.microsoft.com/henrikn/2012/08/07/httpclient-httpclienthandler-an ...

  10. Linux vim编辑器

    1.工作模式 命令模式(a,i,o等键)——>输入模式 输入模式(Esc键)——>命令模式 命令模式(:键)——>末行模式 末行模式(Esc键)——>命令模式 2.vim使用命 ...