逆轉字串
time limit:1000ms memory limit:65536k
total submit:312 accepted:222
description
輸入乙個字串(不含空格,長度不超過1000)你的任務就是把它反序輸出就算你贏了。
input
輸入乙個字串(不含空格)
output
逆轉後的字串
sample input
abcdefgsample output
gfedcbasource
using system;
using system.collections.generic;
using system.linq;
using system.text;
namespace ak1135
}}
字串逆轉
題意 輸入乙個字串,逆向輸出該串。sample input 3frankly,i don t think we ll make much money out of this scheme.madam i m adam sample output hcum ekam ll ew kniht t nod...
逆轉中文字串 逆轉字串
要顯示中文必須使用unsigned char型,如果使用char 就裝不下了。然後要明白乙個unsigned char 其實只是裝了乙個中文字元的一半。列印的時候如果只列印乙個unsigned char有可能什麼都看不到。所以逆轉的時候要把兩個unsigned char看成乙個整體來交換。如下 in...
字串逆轉問題
問題描述 長度為n的字串,在第 i 的位置處向左旋轉或者向右旋轉。比如字串abcdefgh 長度n為8 若將該字串在i 3的位置處,向左旋轉則得到字串defghabc 問題要求 時間複雜度要和n成正比,記憶體幾十位元組。問題解決方法 數學基礎 即將矩陣 ab 變為ba ab a b a b a b ...