摘要:
Python 首先想到的是用py去做,字符串获取后用split直接分割,分割后输出就行,没有难度 1 s = input() 2 word = s.split(" ") 3 word.reverse() 4 print(" ".join(word)) 缺点就是速度慢,占内存,做OJ题都这样吧 C++ 阅读全文
摘要:
用C语言写的,逐个移动每一位的位置实现右移 C语言 1 #include<stdio.h> 2 3 void swap(int* n, int count,int num) { 4 int tmp = 0; 5 int i = 0; 6 int j = count - 2; 7 for (i = 0 阅读全文