2350. Shortest Impossible Sequence of Rolls
Содержание
class Solution:
def shortestSequence(self, rolls: List[int], k: int) -> int:
res = 1
s = set()
for v in rolls:
s.add(v)
if len(s) == k:
res += 1
s.clear()
return res