hdu2629Identity Card
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).
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.
330000198910120036
#include<stdio.h>
#include<string.h>
#include<iostream>
#include<map>
using namespace std;
char a[20],mp[88][15];
int main()
{
int n,y,m,d,dd;
strcpy(mp[33],"Zhejiang");
strcpy(mp[82],"Macao");
strcpy(mp[11],"Beijing");
strcpy(mp[54],"Tibet");
strcpy(mp[71],"Taiwan");
strcpy(mp[21],"Liaoning");
strcpy(mp[81],"Hong Kong");
strcpy(mp[31],"Shanghai");
scanf("%d",&n);
while(n--)
{
scanf("%s",a);
dd=0; y=0;
for(int i=0;i<2;i++) dd=dd*10+a[i]-'0';
for(int i=6;i<=9;i++) y=y*10+a[i]-'0';
printf("He/She is from %s,and his/her birthday is on ",mp[dd]);
printf("%c%c,%c%c,%d",a[10],a[11],a[12],a[13],y);
printf(" based on the table.\n");
}
}
hdu2629Identity Card的更多相关文章
- Lesson 3 Please send me a card
Text Postcards always spoil my holidays. Last summer, I went to Italy. I visited museums and sat in ...
- iOS - Card Identification 银行卡号识别
1.CardIO 识别 框架 GitHub 下载地址 配置 1.把框架整个拉进自己的工程,然后在 TARGETS => Build Phases => Link Binary With L ...
- HDOJ 4336 Card Collector
容斥原理+状压 Card Collector Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/O ...
- Opensuse enable sound and mic card
Install application pavucontrol Run pavucontrol You will see the configuration about sound card and ...
- 进监狱全攻略之 Mifare1 Card 破解
补充新闻:程序员黑餐馆系统 给自己饭卡里充钱 ,技术是双刃剑,小心,小心! 前言 从M1卡的验证漏洞被发现到现今,破解设备层出不穷,所以快速傻瓜式一键破解不是本文的重点,年轻司机将从本文中获得如下技能 ...
- Card(bestcoder #26 B)
Card Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submi ...
- [OpenJudge 3061]Flip The Card
[OpenJudge 3061]Flip The Card 试题描述 There are N× Ncards, which form an N× Nmatrix. The cards can be p ...
- [杂谈]交通工具orca card
How and Where to Use the ORCA Card The Microsoft ORCA card provides unlimited rides on all buses, tr ...
- [OrangePi] Backup internal EMMC to SD Card
Boot your Orange PI board from EMMC without SD Card inserted login insert your SD Card Run: sudo ins ...
随机推荐
- 使2个div 在一行上显示
<!DOCTYPE html> <html> <head> <meta name="viewport" content="wid ...
- Android 开发笔记“context和getApplicationContext”
在android中常常会遇到与context有关的内容 浅论一下context : 在语句 AlertDialog.Builder builder = new AlertDialog.Builder( ...
- C#_C++_SDK_WM_KEYDOWN人物卡顿延迟解决方法
提问者采纳 由Keydown和keyup事件组合,keyDown来判定按下,此时开始移动,KeyUp判定松开,这样可行否? 追问 这是我一开始的写法,但就是因为 键盘重复延迟 导致keydown后会有 ...
- java.lang.ClassCastException: oracle.sql.TIMESTAMP cannot be cast to java.sql.Timestamp
http://stackoverflow.com/questions/13269564/java-lang-classcastexception-oracle-sql-timestamp-cannot ...
- C++的二进制兼容问题(以QT为例)
二进制不兼容带来的问题(需要重新编译库文件,以前编译的失效): http://my.oschina.net/lieefu/blog/505363?fromerr=f5jn7rct 二进制不兼容的原理: ...
- [C++ Basic]C++与Java的主要区别
1.编译运行 java是解释性语言,java程序在运行时类加载器从类路经中加载相关的类,然后java虚拟机读取该类文件的字节,执行相应操作.而C++编译的 时候将程序编译成本地机器码.一般来说java ...
- vs2013 linq to mysql
安装文件 1.下载安装文件 2.创建项目 3.创建mysql数据连接 4.新建ADO.NET数据模型 项目实现代码 using (WorkerContainer db = new WorkerCont ...
- 关于python 模块导入
如何将自己写的库加入到python的库路径中: 首先查看python包含的库路径,步骤如下: a.打开python命令界面 b.import sys c.sys.path 1.在python安 ...
- asp.NET配置
添加用户 1.选择创建用户 2 可以使用网站管理工具来管理应用程序的所有安全设置.可以设置用户和密码(身份验证),可以创建角色(用户组),还可以创建权限(用于控制对应用程序各个部分的访问的规则). ...
- [C#参考]事件和委托的关系
前面说了委托,接下来就要说一说事件了,同时最后再说一下委托和事件的区别. 事件和委托很相似,事件就好像是被简化的针对特殊用途的委托.看下面的图: 从这张图中能看到,事件是发布者的一个成员,它不是类型. ...