题解 | #提取不重复的整数#
提取不重复的整数
http://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1
package main
import (
"fmt"
)
func main() {
var n int
fmt.Scan(&n)
m := make(map[int]bool)
for n != 0 {
if m[n%10] != false {
n /= 10
continue
}
fmt.Print(n % 10)
m[n%10] = true
n /= 10
}
}