STRHH - Half of the half
Given a sequence of 2*k characters, please print every second character from the first half of the sequence. Start printing with the first character.
Input
In the first line of input you are given the positive integer t (1<=t<=100) - the number of test cases. In the each of the next t lines, you are given a sequence of 2*k (1<=k<=100) characters.
Output
For each of the test cases please please print every second character from the first half of a given sequence (the first character should appear).
Example
Input: 4 your progress is noticeable Output: y po i ntc
hide comments
wseymour:
2015-10-19 02:55:11
Has anyone been able to successfully complete this one in C? |
|
zakomon:
2015-10-18 06:40:49
Why does the last input in the example output 'ntc'? could anyone help here? |
|
lakshmi_rohini:
2015-10-15 16:48:21
i posted my code in c..it gives me run time error SIGSEGV..What to do?
|
|
mad_maxxxx:
2015-10-14 11:41:15
now i get it why i am getting run time error, i think it's because we are given a sequence of 2*k (1<=k<=100) characters. :P |
|
mad_maxxxx:
2015-10-14 11:26:02
when am running the code in my pc or even with ideone it gives the corect answer but as soon as i am uploading it says segmentation fault. please help |
|
akay97:
2015-10-14 08:20:57
extremely sorry kuszi |
|
kuszi:
2015-10-12 20:52:14
@akay97 Please do not post many times the same comment or question. It would be also nice from your side to debug your code in the first place. Moreover, how anyone (except admins) could answer your question without seeing the code? Anyway, in the submission number 15353202 you process one case too much, and call many times the strlen function. There might be also other bugs. |
|
akay97:
2015-10-12 20:32:53
my code passes on ideone and devc++, here it gives a runtime error .. why |
|
kanu_lp:
2015-10-09 14:27:36
time limit time limit time limit :/ |
|
pirreli6:
2015-10-01 18:32:48
Time exceeded?
|
Added by: | kuszi |
Date: | 2012-09-01 |
Time limit: | 1s-1.289s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |