# 最も小さい目に見えないが、数字を共有していない！

## チャレンジ

ここではPPCGで、私たちのシーケンスが好きなので、別のものが楽しいです。

Let’s define `a(n)` as being the smallest
non-negative integer `X` that is not equal to any
`a(k)` (`0 < k < n`), and
`a(n-1)` and `X` do not share any decimal
digits. `a(0) = 0`

Given an input `n > 0`, output such
`a(n)`.

たとえば、 `a（12）= 11``a` が入力されているので、
`n = 13` 20 は、 `11`
で10進数字を共有していない、まだ見ていない最小の非負整数です。

## シーケンス

Here are the first 20 terms to get you started. This is シーケンス
A067581 on
OEIS.

``````0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 22, 11, 20, 13, 24, 15, 23, 14, 25
``````

## ルール

• The input and output can be assumed to fit in your language’s
native integer type.
• The input and output can be given in any
convenient format
.
• You can choose to either 0-index, as I am here in my examples,
doing.
• Either a full program or a function are acceptable. If a
function, you can return the output rather than printing it.
environment so other people can try out your code!
• Standard
loopholes
are forbidden.
• This is
so all usual golfing ルール apply, and the shortest code (in bytes)
wins.
ベストアンサー

# Python 2, 85 bytes

-1 byte thanks to Dead Possum

``````n=0,
exec"i=0nwhile set(`i`)&set(`n[-1]`)or i in n:i+=1nn+=i,;"*input()
print n[-1]
``````