杭电OJ--1048-C++实现
2024-10-22 05:13:11
#include <iostream>
#include<vector>
#include<string>
#include<cctype>
#include<algorithm>
#include<stdio.h>
using namespace std;
int main()
{
string alph="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
vector<string> str(3);
while(cin>>str[0] && str[0]!="ENDOFINPUT")
{
getchar();
getline(cin,str[1]);
string::size_type n=str[1].size();
for(decltype(n) i=0;i<n;i++)
{
if(str[1][i]<='Z' && str[1][i]>='A')
{
if((str[1][i]-'A'-5)>=0)
str[1][i]=alph[str[1][i]-'A'-5];
else
str[1][i]=alph[str[1][i]-'A'+21];
}
}
cin>>str[2];
cout<<str[1]<<endl;
}
return 0;
}
最新文章
- .NET基础拾遗(7)Web Service的开发与应用基础
- pod的SDK报错,Linker command failed with exit code1(use -v to see invocation)
- JavaScript错误之:Uncaught ReferenceError: $ is not defined
- linux tomcat 用/etc/init.d/tomcat start启动报错
- OBJ Loader Source Code
- Java for LintCode 颠倒整数
- eclipse使用技巧、快捷键
- openstack排错
- BZOJ 3199 escape
- Java经典问题算法大全
- 【转】OpenCV中使用神经网络 CvANN_MLP
- React Starter Kit 中文文档
- Linux 修改用户名
- Nginx配置了解
- 初试Python语法小试牛刀之冒泡排序
- 理解 Redis(9) - Publish Subscribe 消息订阅
- 大家来找茬:富连网今天中午抢购二手iPhone时网站无法访问的问题
- Charles----- 4.2.7 版本 破解方法
- 今天刚接触lua 写写环境配置和基本设置
- C++中输入输出十六进制八进制