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. 在CDlinux下编译安装无线网卡驱动

    环境 主机:ThinkPadT440P 系统:CDlinux9.7.1 概述 准备利用CDlinux来破解周围的wifi密码来免费蹭网,由于笔记本是新买的,系统没有自带驱动,只能自己手动到网上下载.编 ...

  2. OpenWRT编译记录--TPLINK_WR841ND_V7

    之前自己编译OpenWRT的一些记录,现在搬上来.简单介绍了编译环境的准备,编译过程,以及一些注意事项. 准备工作 本人是在Ubuntu环境下编辑的,首先安装编译所需要的组件包: sudo apt-g ...

  3. PHPMailer实现PHP邮件发送

    1.首先是下载PHPMailer http://code.google.com/a/apache-extras.org/p/phpmailer/ 2.解压 从中取出class.phpmailer.ph ...

  4. hbase 无法操作与hadoop的安全模式的原因

    最近使用hbase时,运行zookeeper的机子没有正常关闭zookeeper就关机了,导致开机后整个hbase集群无法使用,表现为master的localhost:60010 无法登录,使用hba ...

  5. unity3d 学习过程记录

    通过泰克在线,开始学习视频教程 1.学习 Unity3d零基础教学初级篇:熟悉一下unity编辑器结构和控件以及对控件的基本操作 2.学习Roll-a-ball小项目开发:通过练习制作小游戏,巩固所学 ...

  6. SpringMVC 学习-拦截器 HandlerInterceptor 类

    一.拦截器 HandlerInterceptor 类的作用 SpringMVC 的拦截器类似于 Servlet 开发中的过滤器 Filter,用于对处理器进行预处理和后处理. 二.怎么使用呢? 1. ...

  7. Storm源码分析--Nimbus-data

    nimbus-datastorm-core/backtype/storm/nimbus.clj (defn nimbus-data [conf inimbus] (let [forced-schedu ...

  8. C# 语言规范_版本5.0 (第2章 词法结构)

    1. 词法结构 1.1 程序 C# 程序 (program) 由一个或多个源文件 (source file) 组成,源文件的正式名称是编译单元 (compilation unit)(第 9.1 节). ...

  9. Excel教程(14) - 文本和数据函数

    ASC 用途:将字符串中的全角(双字节)英文字母更改为半角 (单字节)字符.   语法:ASC(text) 参数:Text 为文本或包含文本的单元格引用.如果文本 中不包含任何全角英文字母,则文本不会 ...

  10. c# 对象object转换

    object app = new { name = "hyt", age = 18 }; Type t = app.GetType(); var name = t.GetType( ...