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

边栏推荐
- php laravel微信支付
- Insufficient executors to build thread pool
- Php laraver Wechat payment
- AArdio - 【问题】bass库回调时内存增长的问题
- SQL number injection and character injection
- base64
- 她就是那个「别人家的HR」|ONES 人物
- ContentType所有类型对比
- 【R语言】两个/N个数据合并merge函数
- Missing API interface actual development series (14): ID card real name authentication verification
猜你喜欢

源代码加密的意义和措施

【无标题】

【入门】输入n个整数,输出其中最小的k个

Office365 - how to use stream app to watch offline files at any time

Latex table
![[kv260] generate chip temperature curve with xadc](/img/fc/e5e4648b09b1123b2d494b75a9f8f7.png)
[kv260] generate chip temperature curve with xadc

LSTM of RNN

web254

2022 mobile crane driver test exercises and online simulation test

Day5: scanner object, next() and nextline(), sequential structure, selection structure, circular structure
随机推荐
web254
Li Kou daily question - day 31 -1502 Judge whether an arithmetic sequence can be formed
Eigen matrix operation Library
TCP/UDP 通信问题整理
QT -- 1. QT connection database
Two expressions of string
Introduction to kubernetes resource objects and common commands (II)
Access报表实现小计功能
她就是那个「别人家的HR」|ONES 人物
Php laraver Wechat payment
十大劵商如何开户?另外,手机开户安全么?
【入门】输入整型数组和排序标识,对其元素按照升序或降序进行排序
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?
Gdip - hatchbrush pattern table
[skill] create Bat quick open web page
[MySQL learning notes 25] SQL statement optimization
Microsoft stream - how to modify video subtitles
下载Xshell和Xftp
[website architecture] solve 90% of distributed transactions in one move, and introduce the working principles and application scenarios of database transactions and distributed transactions