当前位置:网站首页>[getting started] extract non repeating integers
[getting started] extract non repeating integers
2022-07-01 07:59:00 【-Heaven rewards diligence-】
describe
Enter a int Type integer , Read right to left , Returns a new integer with no repeating numbers . Ensure that the last bit of the input integer is not 0 .
Input description
Enter a int Type integer
Output description
Read right to left , Returns a new integer with no repeating numbers
Example 1
Input :9876673
Output :37689
<?php
fscanf(STDIN, "%d", $a);
// To string
$a .= "";
// Result string
$res = '';
// String length
$len = strlen($a);
for ($i = $len - 1; $i > -1; $i--) {
if (strpos($res, $a[$i]) !== false) {
continue;
}
$res .= $a[$i];
}
echo $res;

边栏推荐
- window c盘满了
- I bet on performance and won the CTO of the company. I want to build Devops platform!
- 图扑软件通过 CMMI5 级认证!| 国际软件领域高权威高等级认证
- Thesis learning -- Analysis and Research on similarity query of hydrological time series
- 【批处理DOS-CMD-汇总】扩展变量-延迟变量cmd /v:on、cmd /v:off、setlocal enabledelayedexpansion、DisableDelayedExpansion
- The H5 page has set the font thickness style, but the wechat access style in Huawei mobile phone doesn't take effect?
- Access报表实现小计功能
- 【入门】输入n个整数,输出其中最小的k个
- 2022 operation of refrigeration and air conditioning equipment operation of national question bank simulated examination platform
- Basic number theory -- combinatorial number
猜你喜欢

2022 electrician (intermediate) recurrent training question bank and answers

图扑软件通过 CMMI5 级认证!| 国际软件领域高权威高等级认证

Atguigu---- scaffold --02- use scaffold (2)

2022 test question bank and simulation test of tea master (primary) operation certificate

2022 mobile crane driver test exercises and online simulation test
![[batch DOS CMD summary] extension variables - delay variables CMD /v:on, CMD /v:off, SETLOCAL enabledelayedexpansion, disabledelayedexpansion](/img/ce/6c9e4f2c54710610e8b1f68d6d8088.png)
[batch DOS CMD summary] extension variables - delay variables CMD /v:on, CMD /v:off, SETLOCAL enabledelayedexpansion, disabledelayedexpansion

【入门】提取不重复的整数

【无标题】

Microsoft stream - how to modify video subtitles

三极管是一项伟大的发明
随机推荐
力扣每日一题-第31天-1790.仅执行一次字符串交换能否使两个字符串相等
Five combination boxing, solving six difficult problems on campus and escorting the construction of educational informatization
Kickback -- find the first palindrome character in a group of characters
Scala language learning-07-constructor
Chinese font Gan: zi2zi
Caesar
力扣每日一题-第31天-1502.判断能否形成等差数列
软件测试方法和技术 - 基础知识概括
[recommendation system] breakthrough and imagination of deep location interactive network dpin for meituan takeout recommendation scenario
Software testing methods and techniques - overview of basic knowledge
三极管是一项伟大的发明
Array: question brushing record
IMDB practice of emotion classification (simplernn, LSTM, Gru)
[MySQL learning notes27] stored procedure
凸印的印刷原理及工艺介绍
How outlook puts together messages with the same discussion
Rk3399 platform development series explanation (network debugging) 7.30. What will affect the sending process of TCP packets?
What information does the supplier need to know about Audi EDI project?
getInputStream() has already been called for this request
Eigen矩阵运算库快速上手