#include <iostream>
#include <string>
using namespace std;
int main()
{
string str;
while (getline(cin, str))
{
if (str[0] == '#')break;
for (string::size_type i = 0; i < str.size(); ++i)
{
if (str[i] == ' ')
{
str.replace(i, 1, "%20");
++i;
}
if (str[i] == '!')
{
str.replace(i, 1, "%21");
++i;
}
if (str[i] == '$')
{
str.replace(i, 1, "%24");
++i;
}
if (str[i] == '%')
{
str.replace(i, 1, "%25");
++i;
}
if (str[i] == '(')
{
str.replace(i, 1, "%28");
++i;
}
if (str[i] == ')')
{
str.replace(i, 1, "%29");
++i;
}
if (str[i] == '*')
{
str.replace(i, 1, "%2a");
++i;
}
}
cout << str << endl;
}
return 0;
}
zju2932
最新推荐文章于 2022-04-22 14:00:00 发布