当前位置:网站首页>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");
}
边栏推荐
- Oracle time display adjustment
- Rust language - receive command line parameter instances
- [Yugong series] February 2022 U3D full stack class 010 prefabricated parts
- Get the path of edge browser
- 让学指针变得更简单(三)
- 链表面试题(图文详解)
- P3047 [usaco12feb]nearby cows g (tree DP)
- C intercept string
- Webrtc series-h.264 estimated bit rate calculation
- 数据治理:误区梳理篇
猜你喜欢
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
[t31zl intelligent video application processor data]
Learn Arduino with examples
opencv学习笔记九--背景建模+光流估计
Step by step guide to setting NFT as an ens profile Avatar
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
Solution: système de surveillance vidéo intelligent de patrouille sur le chantier
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
将 NFT 设置为 ENS 个人资料头像的分步指南
[factorial inverse], [linear inverse], [combinatorial counting] Niu Mei's mathematical problems
随机推荐
In the era of digital economy, how to ensure security?
数据治理:微服务架构下的数据治理
shu mei pai
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
"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 (tree DP)
Launch APS system to break the problem of decoupling material procurement plan from production practice
Helm install Minio
数据治理:数据质量篇
Luogu p1836 number page solution
National economic information center "APEC industry +": economic data released at the night of the Spring Festival | observation of stable strategy industry fund
Le chemin du navigateur Edge obtient
[factorial inverse], [linear inverse], [combinatorial counting] Niu Mei's mathematical problems
Uibehavior, a comprehensive exploration of ugui source code
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
二叉树创建 & 遍历
MFC 给列表控件发送左键单击、双击、以及右键单击消息
将 NFT 设置为 ENS 个人资料头像的分步指南
1015 reversible primes (20 points) prime d-ary
Rust language - receive command line parameter instances