当前位置:网站首页>[getting started] intercepting strings
[getting started] intercepting strings
2022-07-01 07:59:00 【-Heaven rewards diligence-】
describe
Enter a string and an integer k , Before intercepting the string k Characters and output
Input description
1. Enter the string to be intercepted
2. Enter a positive integer k, Represents the intercepted length
Output description
The truncated string
Example 1
Input :abABCcDEF
6
Output :abABCc
Example 2
Input :bdxPKBhih
6
Output :bdxPKB
<?php
fscanf(STDIN, "%s", $a);
fscanf(STDIN, "%d",$k);
echo substr($a,0,$k);

边栏推荐
- Gui Gui programming (XV) - use scale to control font size changes
- [MySQL learning notes 28] storage function
- Gdip - hatchBrush图案表
- 漏刻有时API接口实战开发系列(14):身份证实名鉴权验证
- Day5: scanner object, next() and nextline(), sequential structure, selection structure, circular structure
- I bet on performance and won the CTO of the company. I want to build Devops platform!
- 力扣每日一题-第32天-1822.数组元素积的符号
- Wang Yingqi, founder of ones, talks to fortune (Chinese version): is there any excellent software in China?
- How to make the two financial transactions faster
- Sorting out tcp/udp communication problems
猜你喜欢
![[recommendation system] breakthrough and imagination of deep location interactive network dpin for meituan takeout recommendation scenario](/img/10/ed857892d2e0ea72e100a4008e6d69.png)
[recommendation system] breakthrough and imagination of deep location interactive network dpin for meituan takeout recommendation scenario

Microsoft stream - how to modify video subtitles

window c盘满了

Why some people earn nearly 10billion a year, while others earn 3000 a month: the details you ignore actually make the most money

【入门】取近似值

How to troubleshoot SharePoint online map network drive failure?

奥迪AUDI EDI 项目中供应商需要了解哪些信息?

PostgreSQL source code learning (26) -- windows vscode remote debugging PostgreSQL on Linux

Huawei modelarts training alexnet model

What information does the supplier need to know about Audi EDI project?
随机推荐
【R语言】年龄性别频数匹配 挑选样本 病例对照研究,对年龄性别进行频数匹配
凸印的印刷原理及工艺介绍
【mysql学习笔记26】视图
Oracle create auto increment ID
Thesis learning -- Analysis and Research on similarity query of hydrological time series
Aardio - 阴影渐变文字
[kv260] generate chip temperature curve with xadc
matlab保存DB4i深度相机图片
She is the "HR of others" | ones character
Array: question brushing record
AArdio - 【问题】bass库回调时内存增长的问题
Kickback -- find the first palindrome character in a group of characters
PHP laravel wechat payment
Two expressions of string
What information does the supplier need to know about Audi EDI project?
[R language] age sex frequency matching select samples for case-control study, and perform frequency matching on age and sex
go通用动态重试机制解决方案的实现与封装
【无标题】
[batch DOS CMD summary] extension variables - delay variables CMD /v:on, CMD /v:off, SETLOCAL enabledelayedexpansion, disabledelayedexpansion
Gui Gui programming (XV) - use scale to control font size changes