当前位置:网站首页>1204 character deletion operation (2)
1204 character deletion operation (2)
2022-07-06 07:59:00 【Zhanglilong 666】
Title Description
Delete the string after the specified position character m Characters ( Include characters in the specified position ).
Input requirements
Enter two integer numbers in the first line n and m, Respectively represent the... Of the string n Characters ( Non subscript ) And to delete m Characters .
In the second line, enter the original string to be processed .
Output requirements
Output the processed string .
sample input
7 6 I love movie
sample output
I love
#include<cstdio>
#include<cstring>
int main()
{
char a[1006];
int len,i,sum=0,j=0,n,m;
scanf("%d%d\n",&n,&m);
gets(a);
len=strlen(a);
m=m-1;
n=n-1;
for(i=0;i<len;i++){
if(i<n||i>(m+n)){
printf("%c",a[i]);
}
}
printf("\n");
}
边栏推荐
- 二叉树创建 & 遍历
- PHP Coding Standard
- Data governance: 3 characteristics, 4 transcendence and 3 28 principles of master data
- Parameter self-tuning of relay feedback PID controller
- Flash return file download
- Apache middleware vulnerability recurrence
- Type of data in energy dashboard
- 08- [istio] istio gateway, virtual service and the relationship between them
- 继电反馈PID控制器参数自整定
- Common functions for PHP to process strings
猜你喜欢
Basics of reptile - Scratch reptile
23. Update data
Golang DNS write casually
Comparison of usage scenarios and implementations of extensions, equal, and like in TS type Gymnastics
珠海金山面试复盘
[untitled]
[t31zl intelligent video application processor data]
NFT smart contract release, blind box, public offering technology practice -- jigsaw puzzle
The State Economic Information Center "APEC industry +" Western Silicon Valley will invest 2trillion yuan in Chengdu Chongqing economic circle, which will surpass the observation of Shanghai | stable
[computer skills]
随机推荐
[nonlinear control theory]9_ A series of lectures on nonlinear control theory
DataX self check error /datax/plugin/reader/_ drdsreader/plugin. Json] does not exist
C # display the list control, select the file to obtain the file path and filter the file extension, and RichTextBox displays the data
Notes on software development
CAD ARX 获取当前的视口设置
将 NFT 设置为 ENS 个人资料头像的分步指南
Apache middleware vulnerability recurrence
2.10transfrom attribute
On why we should program for all
[factorial inverse], [linear inverse], [combinatorial counting] Niu Mei's mathematical problems
Wonderful use of TS type gymnastics string
Solution: intelligent site intelligent inspection scheme video monitoring system
Cf1036c class numbers solution
Opencv learning notes 9 -- background modeling + optical flow estimation
Le chemin du navigateur Edge obtient
WebRTC系列-H.264预估码率计算
Nft智能合约发行,盲盒,公开发售技术实战--拼图篇
edge浏览器 路径获得
It's hard to find a job when the industry is in recession
[t31zl intelligent video application processor data]