当前位置:网站首页>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");
}边栏推荐
- Opencv learning notes 8 -- answer sheet recognition
- 让学指针变得更简单(三)
- A Closer Look at How Fine-tuning Changes BERT
- 你想知道的ArrayList知识都在这
- [count] [combined number] value series
- "Designer universe" Guangdong responds to the opinions of the national development and Reform Commission. Primary school students incarnate as small community designers | national economic and Informa
- P3047 [USACO12FEB]Nearby Cows G(树形dp)
- onie支持pice硬盘
- In the era of digital economy, how to ensure security?
- It's hard to find a job when the industry is in recession
猜你喜欢

Interview Reply of Zhuhai Jinshan
![DataX self check error /datax/plugin/reader/_ drdsreader/plugin. Json] does not exist](/img/17/415e66d67afb055e94a966de25c2bc.png)
DataX self check error /datax/plugin/reader/_ drdsreader/plugin. Json] does not exist

Solution: système de surveillance vidéo intelligent de patrouille sur le chantier

【T31ZL智能视频应用处理器资料】

Learn Arduino with examples

Apache middleware vulnerability recurrence

Asia Pacific Financial Media | "APEC industry +" Western Silicon Valley invests 2trillion yuan in Chengdu Chongqing economic circle to catch up with Shanghai | stable strategy industry fund observatio

在 uniapp 中使用阿里图标

Data governance: 3 characteristics, 4 transcendence and 3 28 principles of master data

22. Empty the table
随机推荐
Inspiration from the recruitment of bioinformatics analysts in the Department of laboratory medicine, Zhujiang Hospital, Southern Medical University
Esrally domestic installation and use pit avoidance Guide - the latest in the whole network
Opencv learning notes 9 -- background modeling + optical flow estimation
Data governance: metadata management
octomap averageNodeColor函数说明
二叉树创建 & 遍历
数据治理:元数据管理篇
Step by step guide to setting NFT as an ens profile Avatar
继电反馈PID控制器参数自整定
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
Codeforces Global Round 19(A~D)
Asia Pacific Financial Media | female pattern ladyvision: forced the hotel to upgrade security. The drunk woman died in the guest room, and the hotel was sentenced not to pay compensation | APEC secur
datax自检报错 /datax/plugin/reader/._drdsreader/plugin.json]不存在
在 uniapp 中使用阿里图标
Asia Pacific Financial Media | art cube of "designer universe": Guangzhou community designers achieve "great improvement" in urban quality | observation of stable strategy industry fund
好用的TCP-UDP_debug工具下载和使用
National economic information center "APEC industry +": economic data released at the night of the Spring Festival | observation of stable strategy industry fund
shu mei pai
Basics of reptile - Scratch reptile
[count] [combined number] value series