GNY07A - Mispelling
Misspelling is an art form that students seem to excel at. Write a program that removes the nth character from an input string.
Input
The first line of input contains a single integer N, (1 ≤ N ≤ 1000) which is the number of datasets that follow.
Each dataset consists of a single line of input containing M, a space, and a single word made up of uppercase letters only. M will be less than or equal to the length of the word. The length of the word is guaranteed to be less than or equal to 80.
Output
For each dataset, you should generate one line of output with the following values: The dataset number as a decimal integer (start counting at one), a space, and the misspelled word. The misspelled word is the input word with the indicated character deleted.
Example
Input: 4 4 MISSPELL 1 PROGRAMMING 7 CONTEST 3 BALLOON Output: 1 MISPELL 2 ROGRAMMING 3 CONTES 4 BALOON
hide comments
Sai Praneeeth:
2012-06-02 16:52:14
for
|
|
Mayank Gupta:
2012-05-24 16:32:30
word length should be less than equal to 85. (as told by darky1) |
|
Darky:
2012-04-14 19:47:51
It says the length of the word<=80. Still I had to take 85 because of which I got two WAs! |
|
Arianto Wibowo:
2012-04-02 10:32:32
Can anybody tell me what's wrong with my program? code 6771441 |
|
god_father:
2012-02-11 15:01:31
I AM GETTING RUN TIME error |
|
npsabari:
2012-02-01 13:02:29
getting WA.. what must be the output format for
|
|
Retaliation:
2011-12-19 04:37:38
wat would be output for
|
|
R. Sibi:
2011-12-02 17:14:37
Getting WA even though the solution for the sample input is correct. getting it right for 1 A also ! Last edit: 2011-12-02 17:15:53 |
|
saket diwakar:
2011-10-30 13:29:02
what's about the case
|
|
Giovanni Botta:
2011-08-17 19:55:41
Oddly getting WA... is it possible to have more test cases?
|
Added by: | Marco Gallotta |
Date: | 2008-03-11 |
Time limit: | 19.98s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ERL JS-RHINO NODEJS PERL6 VB.NET |
Resource: | ACM Greater New York Regionals 2007 |