回分類題庫
d184: CP Lab Exercise: String Reverse
出處:

Difficulity : 1
Accepted : 82 Times | Submit :194 Times | Clicks : 1517
Accepted : 74 Users | Submit : 74 Users | Accepted rate : 100%
Time Limit :10000 ms | Memory Limit : 64000 KBytes
題目加入時間 : 2010-11-10 15:59

Content :

The idea is very simple, input a string and reverse it.

Given the function protorype: void stringReverse( char[], char[] );
The first char array is the input string.
The second char array is the reversed string to be stored in.

Example:
char input[5] = "ABCD", result[5] = {'\0'};
stringReverse(input, result);
printf("%s", result);  // Output: DCBA
 

Input :

The first line is an integer N which is the number of test case.
Each line is a string which length is less equal than 50.

Output :

The reversed string.

Sample Input :

2
LEVEL
UP

Sample Output :

LEVEL
PU

Hint :


  

Author :


  Solve it!   Status Forum (0)

C++
C
JAVA
58689. amy1 (6 ms , 412KB)
54867. johnny (8 ms , 202KB)
49594. CC501 (8 ms , 416KB)
46727. sy2es956304 (8 ms , 340KB)
35541. sponge (8 ms , 418KB)
30711. nothinglo (2 ms , 198KB)
27130. cp99703008 (2 ms , 220KB)
26396. cp99703028 (2 ms , 224KB)
26390. cp96208013 (2 ms , 224KB)
54866. ag100 (4 ms , 204KB)
50637. nwgs524513cja (126 ms , 156KB)

執行時間會受很多因素影響因此僅供參考,主機等級請看這裡