Mispelling4
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 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
#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的更多相关文章
- (erase) Mispelling4 hdu1984
Mispelling4 Time Limit: 1000/500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total ...
- HDOJ/HDU 1984 Mispelling4(删除第n个字符~)
Problem Description Misspelling is an art form that students seem to excel at. Write a program that ...
随机推荐
- JVM系列四:生产环境参数实例及分析【生产环境实例增加中】
java application项目(非web项目) 改进前: -Xms128m-Xmx128m-XX:NewSize=64m-XX:PermSize=64m-XX:+UseConcMarkSweep ...
- java线性表学习笔记(二)
链表中的每一个元素都包含一个称为节点的结构,每向链表中增加一个元素,就会产生一个与之相关的节点,每个节点与它相邻的节点相连接(这是基础吧,不过在看c的时候没认真看,呼). 定义节点类如下(使用了泛型, ...
- printf函数重定向
printf函数底层会调用fputc函数 /*重定向c库函数printf到USART1*/ int fputc(int ch, FILE *f) { /*发送一个字节数据USART1 */ USART ...
- Javascript中的数据类型之旅
虽然Javascript是弱类型语言,但是,它也有自己的几种数据类型,分别是:Number.String.Boolean.Object.Udefined.Null.其中,Object属于复杂数据类型, ...
- linux下 ls 排序
ls -lS 按大小降序排列 ls -l | sort -n -k5 按大小升序 ls -lrt 按时间降 ...
- 编译ffmpeg(iOS)
一,x264库的编译 首先到http://www.videolan.org/developers/x264.html下载x264的库,然后解压,修改文件夹名称为x264 二,下载ffmpeg2 ...
- ELF学习--重定位文件
add.c int data = 1;int bss;const int rodata = 1;int add(int num1, int num2){ int sum = 0; sum = num1 ...
- F5 会话保持
1.什么是会话保持?在大多数电子商务的应用系统或者需要进行用户身份认证的在线系统中,一个客户与服务器经常经过好几次的交互过程才能完成一笔交易或者是一个请求的完成.由于这几次交互过程是密切相关的,服务器 ...
- Odoo Qweb报表css丢失问题
有时候我们恢复过来的数据库在打印原来系统的Qweb报表的时候会发现所有的样式都丢失了,只打印内容出来. 这时候我们可以进入Setting/ Technical / Paramters / System ...
- (剑指Offer)面试题30:最小的k个数
题目: 输入n个整数,找出其中最小的K个数.例如输入4,5,1,6,2,7,3,8这8个数字,则最小的4个数字是1,2,3,4,. 思路: 1.排序 把输入的n个整数排序,然后取前k个数: 时间复杂度 ...