c621. Reverse this and that !!
Tags : reverse
Accepted rate : 69人/84人 ( 82% ) [非即時]
評分方式:
Tolerant

最近更新 : 2024-05-03 16:35

Content

給定一個字串,字串是由大小寫字母及數字組成。

例: 123abc456de7fgh890i

請依下列2個條件處理後輸出:

1)  字母的部分原地反轉。

2)  數字的部分依數字於整個字串的位置反轉。

處理後如下輸出: 098cba765ed4hgf321i

Input

123abc456de7fgh890i

Output

098cba765ed4hgf321i

Sample Input #1
123abc456de7fgh890i
FGwxjgdoCaT24txLeGkehc958KP
Sample Output #1
098cba765ed4hgf321i
TaCodgjxwGF85chekGeLxt942PK
測資資訊:
記憶體限制: 512 MB
公開 測資點#0 (25%): 1.0s , <1M
公開 測資點#1 (25%): 1.0s , <1M
公開 測資點#2 (25%): 2.0s , <10M
公開 測資點#3 (25%): 2.0s , <10M
Hint :
Tags:
reverse
出處:
it's david [管理者: asnewchien@g ... (david) ]

Status Forum 排行

ID User Problem Subject Hit Post Date
38938 toseanlin@gm ... (Dr. SeanXD) c621
解題思路
200 2024-01-05 11:10
15756 hshua (hshua) c621
stack應用
1048 2018-10-26 22:46