You are viewing a single comment's thread. Return to all comments →
I am sharing my solution below, feel free to leave comments please.
#!/usr/bin/python3 N = int(input()) W = set(map(int, input().split())) i = 0 while len(W) > 0: i += 1 m = min(W) W = W.difference(set(range(m, m + 5))) print(i)
Seems like cookies are disabled on this browser, please enable them to open this website
Priyanka and Toys
You are viewing a single comment's thread. Return to all comments →
I am sharing my solution below, feel free to leave comments please.