Problem Description
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.
 

Sample Input

4
4 MISSPELL
1 PROGRAMMING
7 CONTEST
3 BALLOON
 
Sample Output
1 MISPELL
2 ROGRAMMING
3 CONTES
4 BALOON
 
 #include <stdio.h>
#include <string.h> int main(){
int T;
int n;
char s[];
int length;
int time;
int i; time=; scanf("%d",&T); while(T--){
scanf("%d%s",&n,s);
length=strlen(s); printf("%d ",time);
time++; for(i=;i<length;i++){
if(i+!=n)
printf("%c",s[i]);
} printf("\n"); } return ;
}
 

Mispelling4的更多相关文章

  1. (erase) Mispelling4 hdu1984

    Mispelling4 Time Limit: 1000/500 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total ...

  2. HDOJ/HDU 1984 Mispelling4(删除第n个字符~)

    Problem Description Misspelling is an art form that students seem to excel at. Write a program that ...

随机推荐

  1. JVM系列一:JVM内存组成及分配

    java内存组成介绍:堆(Heap)和非堆(Non-heap)内存 按照官方的说法:“Java 虚拟机具有一个堆,堆是运行时数据区域,所有类实例和数组的内存均从此处分配.堆是在 Java 虚拟机启动时 ...

  2. usb库文件usb_desc.c分析

    参考<圈圈教你玩USB> usb协议中使用的是小端结构,所以实际数据在传输时是低字节在先的. 设备描述符的实现: 已知每个设备都必须有且仅有一个设备描述符,它的结构在USB协议中有详细的定 ...

  3. Java 理论与实践: 流行的原子——新原子类是 java.util.concurrent 的隐藏精华(转载)

    简介: 在 JDK 5.0 之前,如果不使用本机代码,就不能用 Java 语言编写无等待.无锁定的算法.在 java.util.concurrent 中添加原子变量类之后,这种情况发生了变化.请跟随并 ...

  4. chrome emulator use-agent 设置 chrom模拟手机客户端

    谷歌升级以后,发现找不到use-agent设置了 在Element 下点击ESC 出现console,再点击Emulation就出现了

  5. AFNetworking上传文件

    -(void)upload{ AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; NSD ...

  6. UI:这段时间的小总结

    关于 UITAbleView 的重用机制 参考1  参考2   参考3 关于 UITableViewController  的知识来自博客 参考1  参考2  参考3 总结 一个工程的基本框架的规范写 ...

  7. Qt中的 Size Hints 和 Size Policies

    sizeHint 这个属性所保存的 QSize 类型的值是一个被推荐给窗口或其它组件(为了方便下面统称为widget)的尺寸,也就是说一个 widget 该有多大,它的一个参考来源就是这个 sizeH ...

  8. Programming pages of Jasper Neumann

    http://programming.sirrida.de/ Discussion topics Bit permutations Download source files List of func ...

  9. ISO 9141-2 and ISO 14230-2 INITIALIZATION and DATA TRANSFER

    http://ecad.tu-sofia.bg/et/2005/pdf/Paper097-P_Dzhelekarski1.pdf INITIALIZATION Prior to any diagnos ...

  10. Java内存区域分析

    程序计数器 指令运行的指示器. 每一个线程都有独立的程序计数器,互无影响,我们称这类区域为线程私有的内存. 运行Java方法,计数器记录的是正在运行的虚拟机字节码指令地址;假设运行的是native方法 ...