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

边栏推荐
- AUTOSAR learning record (1) – ECUM_ Init
- Scala language learning-07-constructor
- MATLAB之基础知识
- PWN攻防世界int_overflow
- 2022危险化学品经营单位主要负责人试题及模拟考试
- [MySQL learning notes27] stored procedure
- Wang Yingqi, founder of ones, talks to fortune (Chinese version): is there any excellent software in China?
- The triode is a great invention
- Software testing methods and techniques - overview of basic knowledge
- Aardio - 阴影渐变文字
猜你喜欢

【无标题】

【入门】截取字符串

Gdip - hatchBrush图案表

Eigen矩阵运算库快速上手

2022 mobile crane driver test exercises and online simulation test

2022 test questions and mock examinations for main principals of hazardous chemicals business units

Gru of RNN

web254

Discussion on several research hotspots of cvpr2022

Array: question brushing record
随机推荐
php laravel微信支付
【无标题】
Significance and measures of source code encryption
[website architecture] solve 90% of distributed transactions in one move, and introduce the working principles and application scenarios of database transactions and distributed transactions
Aardio - 自己构造的getIconHandle的方法
Scala language learning-07-constructor
sqlalchemy创建MySQL_Table
【mysql学习笔记26】视图
Li Kou daily question - day 31 -1502 Judge whether an arithmetic sequence can be formed
Lm08 mesh series mesh inversion (fine)
ONES 创始人王颖奇对话《财富》(中文版):中国有没有优秀的软件?
Vhost kick & call principle
Instead of houses, another kind of capital in China is rising
go通用动态重试机制解决方案的实现与封装
[software] phantomjs screenshot
Contenttype comparison of all types
力扣每日一题-第32天-1822.数组元素积的符号
[untitled]
力扣每日一题-第31天-1502.判断能否形成等差数列
STM32 uses esp01s to go to the cloud, mqtt FX debugging