poj 3650
来源:互联网 发布:京东微信端口什么意思 编辑:程序博客网 时间:2024/05/30 04:37
字符串变形
#include <cstdio>#include <iostream>#include <string.h>#include <stdlib.h>#include <fstream>#include <math.h>#include <queue>#include <algorithm>#define INF 0x3f3f3f3fusing namespace std;char s[100];int main(){//freopen ("input.txt","r",stdin);while(true){gets(s);int l=strlen(s);if(l==1&&s[0]=='#')break;for(int i=0;i<l;i++){if(s[i]==' ') cout<<"%20";else if(s[i]=='!') cout<<"%21";else if(s[i]=='$') cout<<"%24";else if(s[i]=='%') cout<<"%25";else if(s[i]=='(') cout<<"%28";else if(s[i]==')') cout<<"%29";else if(s[i]=='*') cout<<"%2a";else cout<<s[i];}cout<<endl;}return 0;}
0 0
- POJ 3650
- poj 3650
- POJ
- poj
- POJ
- POJ
- poj
- poj
- POJ
- POJ
- poj
- POJ
- POJ
- POJ
- POJ
- POJ
- POJ
- POJ
- Compound Words
- C - Semifinals
- 【转】自定义Hadoop数据类型
- openstack快照技术分析优化
- Ant Trip (HDU3018)欧拉图
- poj 3650
- [windows程序设计]-消息弹框,messagebox---ShinePans
- Softmax Regression
- QuadTree c++实验结果
- UIUtils的常用方法(格式化字符串/计算文件的大小)
- 用Fiddler记录IE的request
- 深入浅出游戏算法(3)-lua脚本(8)
- Tomcat环境配置
- Java中final的小秘密