杭电1048The Hardest Problem Ever
来源:互联网 发布:淘宝店铺可以过户吗 编辑:程序博客网 时间:2024/04/29 22:14
#include<iostream>
#include<string>
using namespace std;
int main()
{
string s;
while (cin>>s)
{
if(s=="ENDOFINPUT")
break;
cin.ignore();
string str,r;
getline(cin,str);
cin>>r;
for(int i=0;i<str.size();++i)
{
if(str.at(i)<='E'&&str.at(i)>='A')
str.at(i)+=21;
else if(str.at(i)<='Z'&&str.at(i)>='F')
str.at(i)-=5;
else
continue;
}
cout<<str<<endl;
}
return 0;
#include<string>
using namespace std;
int main()
{
string s;
while (cin>>s)
{
if(s=="ENDOFINPUT")
break;
cin.ignore();
string str,r;
getline(cin,str);
cin>>r;
for(int i=0;i<str.size();++i)
{
if(str.at(i)<='E'&&str.at(i)>='A')
str.at(i)+=21;
else if(str.at(i)<='Z'&&str.at(i)>='F')
str.at(i)-=5;
else
continue;
}
cout<<str<<endl;
}
return 0;
}
字符串问题
0 0
- The Hardest Problem Ever(杭电1048)
- 杭电1048The Hardest Problem Ever
- 杭电1048 The Hardest Problem Ever
- 【杭电】[1048]The Hardest Problem Ever
- 杭电OJ1048-The Hardest Problem Ever
- 杭电 HDU 1048 The Hardest Problem Ever
- 杭电1048(The Hardest Problem Ever)
- 1048 The Hardest Problem Ever
- 1048 The Hardest Problem Ever
- 1048:The Hardest Problem Ever
- 杭电1048——The Hardest Problem Ever(字符串)
- The Hardest Problem Ever
- The Hardest Problem Ever
- The Hardest Problem Ever
- The Hardest Problem Ever
- The Hardest Problem Ever
- The Hardest Problem Ever
- The Hardest Problem Ever
- python自动化获取网页编码方式
- leetcode_114_Flatten Binary Tree to Linked List
- 黑马程序员——Objective-c——Foundation集合
- C++应用实战项目开发视频教程
- Android省流量升级
- 杭电1048The Hardest Problem Ever
- C++流的概念
- cocos2dx实现自定义2D地形
- VMware10.0安装Mac OS X 10.9超详细教程
- apache配置 - 跨域资源共享(Cross-Origin Resource Sharing)
- 固定位置的Js悬浮窗口
- 树, 二叉树, 二叉搜索树
- C语言 不允许创建临时变量,交换两个数的内容
- C++标准IO库