九度 题目1055:数组逆置
2014-07-25 14:08
295 查看
题目来源:http://ac.jobdu.com/problem.php?pid=1055
时间限制:1 秒
内存限制:32 兆
特殊判题:否
提交:6307
解决:2861
题目描述:
输入一个字符串,长度小于等于200,然后将数组逆置输出。
输入:
测试数据有多组,每组输入一个字符串。
输出:
对于每组输入,请输出逆置后的结果。
样例输入:
样例输出:
来源:2011年哈尔滨工业大学计算机研究生机试真题
时间限制:1 秒
内存限制:32 兆
特殊判题:否
提交:6307
解决:2861
题目描述:
输入一个字符串,长度小于等于200,然后将数组逆置输出。
输入:
测试数据有多组,每组输入一个字符串。
输出:
对于每组输入,请输出逆置后的结果。
样例输入:
hdssg
样例输出:
gssdh
来源:2011年哈尔滨工业大学计算机研究生机试真题
#include <cstdio> #include <cstring> #include <iostream> using namespace std; const int MAXN = 210; int main() { char str[MAXN]; while (~scanf("%s", str)) { int Len = strlen(str); for(int i = Len-1; i >= 0; --i) printf("%c", str[i]); printf("\n"); } return 0; }
相关文章推荐
- 九度oj 题目1055:数组逆置
- 九度 Online Judge 算法 刷题 题目1055:数组逆置
- 九度 题目1055:数组逆置
- 九度OJ-题目1055 数组逆置
- 题目1055:数组逆置
- 九度论坛--上机题1055:数组逆置
- 题目1055:数组逆置
- 题目1055:数组逆置
- 题目1055:数组逆置
- 题目1055:数组逆置
- 九度OJ题目1055:数组逆置
- 九度 OJ 1055:数组逆置 字符串处理
- 九度OJ—题目1055:数组逆置
- 题目1055 数组逆置 九度Online Judge
- 九度 题目1386:旋转数组的最小数字
- 九度OJ-题目1370:数组中出现次数超过一半的数字
- 九度OJ 1055:数组逆置 (基础题)
- 题目1527:首尾相连数组的最大子数组和-九度
- 九度OJ月赛---题目1534:数组中第K小的数字 (二分搜索)
- 九度OJ-题目1167-数组排序-结构体数组排序