当前位置:网站首页>[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);

边栏推荐
- 关系数据库如何工作
- 图扑软件通过 CMMI5 级认证!| 国际软件领域高权威高等级认证
- AArdio - 【问题】bass库回调时内存增长的问题
- Minecraft 1.16.5 module development (51) tile entity
- Conscience Amway universal wheel SolidWorks model material website
- Teach you how to apply for domestic trademark online step by step
- 力扣每日一题-第31天-1790.仅执行一次字符串交换能否使两个字符串相等
- Inftnews | from "avalanche" to Baidu "xirang", 16 major events of the meta universe in 30 years
- 【入门】提取不重复的整数
- 2022年茶艺师(中级)复训题库及答案
猜你喜欢
随机推荐
长路漫漫、技术作伴
她就是那个「别人家的HR」|ONES 人物
[MySQL learning notes 25] SQL statement optimization
十大劵商如何开户?另外,手机开户安全么?
[R language] two /n data merge functions
How relational databases work
Array: question brushing record
2022 electrician (intermediate) recurrent training question bank and answers
The triode is a great invention
Lm08 mesh series mesh inversion (fine)
2022 Guangdong Provincial Safety Officer a certificate third batch (main person in charge) special operation certificate examination question bank simulated examination platform operation
软键盘高度报错
[skill] create Bat quick open web page
Why some people earn nearly 10billion a year, while others earn 3000 a month: the details you ignore actually make the most money
力扣每日一题-第32天-1822.数组元素积的符号
Latex formula code
[website architecture] solve 90% of distributed transactions in one move, and introduce the working principles and application scenarios of database transactions and distributed transactions
Teach you how to apply for domestic trademark online step by step
三极管是一项伟大的发明
Basic number theory -- combinatorial number








