1530. The Seven Percent Solution
来源:互联网 发布:判断素数的c语言程序 编辑:程序博客网 时间:2024/04/30 03:23
http://soj.me/show_problem.php?pid=1530
#include <iostream>
#include <string>
#include <map>
using namespace std;
bool check(char c)
{
if(c==' '||c=='!'||c=='$'||c=='%'||c=='('||c==')'||c=='*')
return true;
return false;
}
int main()
{
map<char,string>m;
m[' ']="%20";
m['!']="%21";
m['$']="%24";
m['%']="%25";
m['(']="%28";
m[')']="%29";
m['*']="%2a";
string str;
while(true)
{
getline(cin,str);
if(str[0]=='#') break;
string s="-";
for(int i=0;i<str.length();i++)
{
if(check(str[i]))
s+=m[str[i]];
else s.push_back(str[i]);
}
for(int i=1;i<s.length();i++)
cout<<s[i];
cout<<endl;
}
return 0;
}
- 1530. The Seven Percent Solution
- the seven percent solution
- The Seven Percent Solution
- The Seven Percent Solution
- The Seven Percent Solution
- The Seven Percent Solution
- The Seven Percent Solution
- Sicily 1530. The Seven Percent Solution
- Sicily1530 The Seven Percent Solution
- HDU2719:The Seven Percent Solution
- POJ3650----The Seven Percent Solution
- HDU_OJ-The Seven Percent Solution
- HDU The Seven Percent Solution
- zoj 2932 The Seven Percent Solution
- poj 3650 The Seven Percent Solution
- poj 3650 The Seven Percent Solution
- ZOJ 2932 The Seven Percent Solution
- hd 2719 The Seven Percent Solution
- android开发神贴
- 杨辉三角问题-计算第m层的第n个系数 (递归实现)
- 做个男人,做个成熟的男人,做个有城府的男人
- HDU3926 Hand in Hand, 图形同构判断
- db2命令
- 1530. The Seven Percent Solution
- vc中各种类型字符串的转换 CComBSTR Char BSTR LPSTR LPCTSTR LPWSTR
- python调试
- Codeforces Round #104 (Div. 1) E Lucky Queries
- 2012年最新英语学习网站
- 如何解决错误:Android.Process.Acore 异常终止错误
- LINUX内存管理
- windows下oracle10g服务启动时并不启动实例的方法之一
- C#主要控件名简写对照表