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 ...
随机推荐
- webrtc--AudioProcessing的使用
1.AudioProcessing的实例化和配置: AudioProcessing* apm = AudioProcessing::Create(0); apm->level_estimator ...
- ASP.NET前台AJAX方法调用后台的方法写法
前台: <input id="AjaxDemo" type="button" onclick="get()" value=" ...
- 如何在Html的CSS中去除<li>标签前面小黑点,和ul、LI部分属性方法
div是很多人做网站都会用到的,但在显示效果时前面总是会有一个小黑点,这个效果很多人不想要,但又不知到如何去除,然而我们可以用以下方法来清除. 1.在CSS中写入代码.找到相关性的CSS,在..li和 ...
- HDU 4588 Count The Carries (数学,计数)
题意:给定两个十进制数,求二进制中,从x加到y的二进制进了多少位. 析:把这些数字的二进制纵向罗列出来,然后一位一位的把和加起来,最终得到总的进位数.从1到x,第i位上1的总数是x左移i+1位再右移i ...
- CCD摄像机与CMOS摄像机区别
CCD摄像机 什么是CCD摄像机? CCD是Charge Coupled Device(电荷耦合器件)的缩写,它是一种半导体成像器件,因而具有灵敏度高.抗强光.畸变小.体积小.寿命长.抗震动等优点. ...
- js ajax post提交 ie和火狐、谷歌提交的编码不一致,导致中文乱码
今天遇到一个问题找了很久发现: 使用js ajax post提交 ie和火狐.谷歌提交的编码不一致,导致中文乱码 //http://www.cnblogs.com/QGC88 $.ajax({ url ...
- d3d导致cairo不正常
最近要把cairo集成到项目中,却发现cairo不能工作了 折腾了两天才找到了原因:cairo的一个trick导致浮点数计算错误: http://blog.163.com/lvan100@yeah/b ...
- Castle 开发系列文章
转自:http://terrylee.cnblogs.com/archive/2006/04/28/castl_ioc_article.html Castle是针对.NET平台的一个开源项目,从数据访 ...
- 一个html5 + nodejs的游戏
可以阅读Mozilla开源的Browser Quest这个项目,一个html5 + nodejs的游戏,完整演示了客户端服务端怎么通讯的,逻辑怎么做的,通讯怎么做的,很值得参考. 游戏demo: ht ...
- OBD Experts OBD II Software OBD II Protocol Stack
http://www.obdexperts.co.uk/stack.html OBD II Software OBD Experts can provide you with ready to use ...