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 ...
随机推荐
- http://blogs.msdn.com/b/pranavwagh/archive/2007/03/03/word-2007-file-seems-to-be-deleted-when-you-open-and-save-it-using-dsoframer.aspx
http://blogs.msdn.com/b/pranavwagh/archive/2007/03/03/word-2007-file-seems-to-be-deleted-when-you-op ...
- Controlling GameObjects Using Components
[Accessing Components] The most common case is where a script needs access to other Components attac ...
- Python基础 数字、字符串、列表、元组、字典
Number(数字)---> int.float.complex(复数) class int 在Python3中,整形(int)就是常见的整数:1,100,500,1000...... 浮点型( ...
- POJ3468 A Simple Problem with Integers(线段树延时标记)
题目地址http://poj.org/problem?id=3468 题目大意很简单,有两个操作,一个 Q a, b 查询区间[a, b]的和 C a, b, c让区间[a, b] 的每一个数+c 第 ...
- C++STL学习笔记_(3)stack
10.2.4stack容器 Stack简介 ² stack是堆栈容器,是一种"先进后出"的容器. ² stack是简单地装饰deque容器而成为另外的一种容器. ² #inc ...
- POJ2503——Babelfish
Description You have just moved from Waterloo to a big city. The people here speak an incomprehensib ...
- easyui datagrid 的分页刷新按钮
datagrid 刷新bug: 情形: 当用户A,B 同时操作 datagrid时(记录1,记录2.记录3).如果A如果删除记录1, B此时已选中了记录1 ,记录2 , 这时B点击分页中的刷新按 ...
- 无责任Windows Azure SDK .NET开发入门篇二[使用Azure AD 进行身份验证]
二.使用Azure AD进行身份验证 之所以将Azure AD 作为开始,是应为基本上我们所有应用都需要进行安全管理.Azure Active Directory (Azure AD) 通过以下方式简 ...
- sqldependency 支持的select
https://msdn.microsoft.com/library/ms181122.aspx 支持的 SELECT 语句 满足下列要求的 SELECT 语句支持查询通知: 必须显式说明 SEL ...
- UE 的使用
1.查找,只匹配整个词语:匹配词语Andy,而不匹配包含Andy的词语,Andy前后有特殊字符才能匹配成功,前后的特殊字符表明Andy是一个词语. 2.正则表达式匹配,如下: 符号 功能 % 匹配行首 ...