Encoded Love-letter
Encoded Love-letter
Time Limit : 1000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)
Total Submission(s) : 35 Accepted Submission(s) : 14
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- char c[];
- int main()
- {
- int n,i,sign1,sign2,j,k;
- char a[],b[];
- gets(a);
- sign1=strlen(a);
- for(i=;i<;i++)
- {
- b[i]='A'+i;
- b[i+]='a'+i;
- }
- for(i=;i<sign1;i++)
- {
- a[i+]=a[i]+;
- }
- for(i=sign1,j=;i<;i++,j++)
- {
- a[i]='Z'-j;
- a[i+]='z'-j;
- for(k=;k<sign1;k++)
- if(a[i]==a[k])
- {
- i--;break;
- }
- }
- while(gets(c))
- {
- sign2=strlen(c);
- for(i=;i<sign2;i++)
- {
- if(c[i]>='A'&&c[i]<='Z')
- for(k=;k<;k++)
- if(c[i]==a[k])
- {
- c[i]=b[k];break;
- }
- if(c[i]>='a'&&c[i]<='z')
- for(k=;k<;k++)
- if(c[i]==a[k])
- {
- c[i]=b[k];break;
- }
- }
- printf("%s\n",c);
- }
- return;
- }
Encoded Love-letter的更多相关文章
- B - Encoded Love-letter 字符串的处理
B - Encoded Love-letter Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & % ...
- CodeChef KILLKTH Killjee and k-th letter
题意 dt { font-weight: bold; margin-top: 20px; padding-left: 35px; } dd { box-shadow: 3px 3px 6px #888 ...
- HDU 1591 Encoded Love-letter(简单字符串)
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission( ...
- [LeetCode] Letter Combinations of a Phone Number 电话号码的字母组合
Given a digit string, return all possible letter combinations that the number could represent. A map ...
- Example: Encoded SNMP Message - SNMP Tutorial
30.11 Example Encoded SNMP Message The encoded form of ASN.1 uses variable-length fields to represen ...
- 17. Letter Combinations of a Phone Number
题目: Given a digit string, return all possible letter combinations that the number could represent. A ...
- 什么是Unicode letter
起因:从一段代码说起 using System; using System.Collections.Generic; using System.Linq; using System.Text; usi ...
- LeetCode——Letter Combinations of a Phone Number
Given a digit string, return all possible letter combinations that the number could represent. A map ...
- No.017:Letter Combinations of a Phone Number
问题: Given a digit string, return all possible letter combinations that the number could represent.A ...
随机推荐
- bower工具的简单使用
基于NodeJS的一个静态资源管理工具,由twitter公司开发维,解决大型网站中静态资源的依赖问题. 1.依赖NodeJS环境和git工具. 2.npm install -g bower安装bowe ...
- VPS服务器利用WINSCP软件进行SFTP管理服务器文件
虽然我使用VPS时间也不是很久,但是我善于进行统计和分析,从我在的一些VPS交流QQ群中,可以看到基本上使用搬瓦工VPS的站长群中新手较多,甚至很多人都搞不明白VPS与V-P-N的区别都直接选择VPS ...
- 如何在sublime中使用sass
搞了好久,终于把sass搞定了. 最开始,我是想使用koala来实现对sass的实时编译的,但是每当我保存的时候,总是弹出erro错误,即无法编译生成css文件,百度了半天,问了好久,这个问题还是没能 ...
- 关于js优化和css优化
css优化: 1.css代码的压缩. 2.css文件的合并. 3.不滥用float,因为float在渲染时计算量比较大,所以尽量减少使用float. 4.避免在html标签中写style属性. js优 ...
- Windows系统顽固文件删除方法
con nul都是windows的设备,默认是不允许删除的,如果你一定要删除,可以按照以下方法进行删除!新建一个记事本输入一下内容(直接复制即可)DEL /F /A /Q \\?\%1 RD /S / ...
- Struts入门学习(一)
刚开始学习框架的时候感觉很简单,都是用到javaEE的相关框架,自己就想研究源码,但是学了很久之后毫无头绪,所以还是扎扎实实学好Struts毕竟框架做起来要比自己写javaEE要简单,下面我们就来一步 ...
- openwrt拦截snmp报文
SNMP使用的协议为UDP,默认端口为161和162. 使用iptables 命令如下: iptables -A INPUT -p udp -m udp --dport 161:162 -j DROP ...
- 关于逆波兰式的c++实现
正常的表达式 逆波兰表达式 a+b ---> a,b,+ a+(b-c) ---> a,b,c,-,+ a+(b-c)*d ---> a,b,c,-,d,*,+ a+d*(b-c)- ...
- HttpReceiveRequestEntityBody 使用应注意的地方
如果EntityBody数据很大,调用此函数是不能完全接收全部数据的,我们不能简单的判断 1: BYTE* pBuffer = new BYTE[4096]; 2: ZeroMemory(pBuffe ...
- kindeditor编辑器,图片上传功能齐全
废话不多说直接上文件包压缩包:kindeditor图片上传(VS2012)