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 ...
随机推荐
- jbpmAPI-7
7.1. Introduction 业务流程的一个重要方面是人工任务管理.虽然一些执行的工作过程中可以自动执行一些任务需要执行的人类演员.jBPM支持特殊的人工任务节点内部流程建模与人类用户交互.这个 ...
- 关于Python中的yield(转载)
您可能听说过,带有 yield 的函数在 Python 中被称之为 generator(生成器),何谓 generator ? 我们先抛开 generator,以一个常见的编程题目来展示 yield ...
- Docker背后的容器管理——Libcontainer深度解析
Libcontainer 是Docker中用于容器管理的包,它基于Go语言实现,通过管理namespaces.cgroups.capabilities以及文件系统来进行容器控制.你可以使用Libcon ...
- C#计算时间差。
C#中怎么计算两时间相差多少.计算2个时间之间的差,可以计算到时分秒! <1>label1.Text = “2004-1-1 15:36:05″;label2.Text = “2004-3 ...
- my.ini配置
在家里写点东西,需要配置mysql windows版本,linux版本我一般都是直接编译后,有模板文件可以编辑,新下载的5.6没有,我用的是zip的. 在网上找了两篇博客,写的很详细: http:// ...
- JAVA FILE or I/O学习 - File学习
public class FileKnow { public static void main(String[] args) { //构建file对象 ,参数表示文件所在的路径 File file = ...
- java解析xml的几种方式
java解析xml的几种方式 DOM DOM的全称是Document ObjectModel,也即文档对象模型.在应用程序中,基于DOM的XML分析器将一个XML文档转换成一个对象模型的集合(通常称D ...
- HDU2795 billboard【转化为线段树。】
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2795 hhanger大神的题目,水题都得有点思维. 题意:h*w的木板,放进一些1*L的物品,求每次放 ...
- U盘安装Ubuntu14.4时遇到分区问题记录
1.在安装Ubuntu14.4时,遇到如果先分出 / 跟挂载的主分区时,后面只能再分一个swap,或者挂载一个/home,或者一个/ boot 时不能继续分区,当然想安装也是不能不能成功的. 解决办法 ...
- JQuery的JSTree使用
这是一个树形菜单的展示.其功能及其强大,几乎可以提供你对树结构的各种要求.下面,对其简述. 首先,感谢 Ivan Bozhanov利用JQuery对该组件的开发.同时还要感谢我的技术总监Mr. ...