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. 寒假学干货之------android开发环境

    1.下载安装jdk(http://www.oracle.com/technetwork/java/javase/downloads/index.html)装se版的就可以了,复制jdk目录路径,之后配 ...

  2. Toast用法

    应用场景:弹出提示信息 主界面: 代码如下: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(sa ...

  3. 用 Python 脚本实现对 Linux 服务器的网卡流量监控

    *这篇文章网上已经有相关代码,为了加深印象,我做了相关批注,希望对朋友们有帮助 工作原理:基于/proc文件系统 Linux 系统为管理员提供了非常好的方法,使其可以在系统运行时更改内核,而不需要重新 ...

  4. jQuery(6)——jQuery对表单、表格的操作及更多应用

    jQuery对表单.表格的操作及更多应用 [表单应用] 一个表单有表单标签.表单域及表单按钮三个基本部分. 单行文本框应用:获取和失去焦点改变样式. 也可以用CSS中的伪类选择符来实现,但是IE6并不 ...

  5. public static void main(String[] args){} 关于Java main()方法

    是Java程序的入口方法,JVM在运行程序时,会首先查找main()方法. public是权限修饰符,表明任何类或对象都可以访问这个方法: static表明main()方法是一个静态方法,即方法中的代 ...

  6. jquery实现图片漂浮效果

    $(window).load(function(){   function moveRocket(){   $("#float").animate({'left':'+=100'} ...

  7. 转:详解JMeter正则表达式(1)

    1.概览 JMeter中包含范本匹配软件Apache Jakarta ORO .在Jakarta网站上有一些关于它的文档,例如a summary of the pattern matching cha ...

  8. SVD分解技术详解

    版权声明: 本文由LeftNotEasy发布于http://leftnoteasy.cnblogs.com, 本文可以被全部的转载或者部分使用,但请注明出处,如果有问题,请联系wheeleast@gm ...

  9. html5--画布

    简介 canvas是HTML5中的新元素,你可以使用javascript用它来绘制图形.图标.以及其它任何视觉性图像.它也可用于创建图片特效和动画.canvas 元素本身是没有绘图能力的.所有的绘制工 ...

  10. C# Monads的实现(一)

    了解Haskell语言的朋友都知道它是一门纯函数式编程,输出结果只跟输入参数相关,这导致Haskell不能有输入输出函数,因为不同的环境下,输入相同,但输出可能有所不同.Haskell语言中,变量的值 ...