主站
DreamJudge
院校信息
专业题库
模拟考试
机试真题
专业课程
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
我能走到对岸吗
2024年4月19日 23:51
字符串翻转 题解:
P1006
回复 0
|
赞 1
|
浏览 51
#include<bits/stdc++.h> using namespace std; int main() { string s; getline(cin, s); reverse(s.begin(), s.end()); cout << s; return 0; }
kar
2024年3月26日 20:12
字符串翻转 题解:C++
P1006
回复 0
|
赞 0
|
浏览 240
int main(){ string str; cin>>str; reverse(str.begin(),str.end()); cout<<str<<endl; return 0; }
渐鸿于陆
2024年3月16日 21:17
字符串翻转 题解:
P1006
回复 0
|
赞 0
|
浏览 507
#include"stdio.h" #include"stdlib.h" #include"string.h" int main(void){ char s[105] = {0}; gets(s); int len = strlen(s); for(int i = len-1;i>=0;i--){  ...
928上岸梦校!
2023年8月6日 12:27
STL容器的逆序输出
P1006
回复 3
|
赞 2
|
浏览 844
C++参考代码如下: #include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; for (auto it = s.rbegin(); it != s.rend(); it++) { cout << *it; } return 0; }
FCC
2024年3月14日 21:29
字符串翻转 题解:reverse()函数
P1006
回复 0
|
赞 0
|
浏览 226
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; reverse( s.begin(), s.end() ); //字符串迭代器 cout << s; return 0; }
小酒
2024年3月11日 15:50
字符串翻转 题解:
P1006
回复 0
|
赞 0
|
浏览 302
1006解题思路 #include <bits/stdc++.h> using namespace std; int main() { char a[100]; char k; int i=0; gets(a); while(!a[i]==0) { i...
williams
2024年3月8日 16:50
字符串翻转 题解:
P1006
回复 0
|
赞 0
|
浏览 288
#include <stdio.h> #include <string.h> int main(void){ char s[100]; gets(s); for(int i=strlen(s)-1;i>=0;i--) printf("%c",s[i]); return 0; }
lingdongyang
2024年3月7日 10:18
字符串翻转 题解:C
P1006
回复 0
|
赞 0
|
浏览 351
#include<stdio.h> #include<string.h> #include<stdlib.h> int main() { char s[105]; scanf("%s", &s); int len = strlen(s); for (int i = len - 1; i >= 0; i--) { printf("%c", s[i]); } return 0; }
红星闪闪
2023年7月9日 19:17
字符串翻转 题解:
P1006
回复 1
|
赞 3
|
浏览 1.1k
#include<stdio.h> #include<string.h> int main(){ char c[101]; gets(c); int n=strlen(c); for(int i=n-1;i>=0;i--){ printf("%c",c[i]);  ...
猪蹄子全是肉
2023年5月4日 16:19
字符串翻转 题解:
P1006
回复 0
|
赞 1
|
浏览 912
#include <iostream> #include <algorithm> #include <cmath> #include <cstring> using namespace std; char s[110]; // 定义 char 类型数组 s,用于存储字符串 int main() { scanf("%s", s); // 使用 scanf 输入字符串 s int len = strlen(s); // 计...
1
2
3
题目
字符串翻转
题解数量
26
发布题解
热门题解
1
1006 - 字符串翻转(C语言)
2
字符串翻转 题解:
3
STL容器的逆序输出
4
递归实现字符串反转(c语言)
5
1006 字符串翻转
6
c++实现
7
他让你怎么做,你就怎么做
8
字符串反转
9
P1006 - 字符串翻转 - C
10
字符串翻转 题解: