题解 | #提取不重复的整数#
提取不重复的整数
https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1
import java.util.Scanner fun main(args: Array<String>) { val read = Scanner(System.`in`) val res = read.nextLine() val rev = res.reversed().toInt().toString() val set = HashSet<Char>() rev.forEach { if(set.add(it)) { print(it) } } }