题解 1093: 字符逆序

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

超简短,通俗易懂的代码

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){    char s[109];    int len;  ……

全网最短的代码

摘要:解题思路:注意事项:存入的数组最后一项系统给了空格,在输出的时候第一项要减二参考代码:#include<stdio.h>#include<string.h>int main(){char str[10……

一行代码解决字符逆序问题

摘要:解题思路:由于input输出的直接就是字符串,我们就可以直接对字符串进行逆序,使用的方法就是切片逆序[::-1],-1就是逆序输出,那么解题方法就很简单了,一行代码就可以解决。参考代码:print(s……

1093: 字符逆序

摘要:直接用 reverse 函数将字符串逆序。#include <bits/stdc++.h> using namespace std; int main() {     string s; ……

StringBuffer里面的reverse方法

摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main { public static void main(String[] args) {……

1093: 字符逆序(c++)

摘要:解题思路:注意事项:主义头文件#include<string>参考代码:#include <iostream>#include<string>using namespace std;int main(……

用切片来写

摘要:a=input()count=len(a)z=count-1q=countfor i in range(count):    print(a[z:q],end=&#39;&#39;)    z-=1 ……