Given a month with arbitrary number of days, N, and an integer K representing the day with which it starts. ie- 1 for Monday, 2 for Tuesday and so on.  Find the number of times each day (Monday, Tuesday, ..., Sunday) appears in the month. 
 
Example 1:
Input:
N = 31 , K = 1
Output:
5 5 5 4 4 4 4 
Explanation: The month starts from Monday.
There will be 4 days of each day
(Sunday , Monday , etc) upto 28th of the
Month. Then, The successive 3 days will
have a extra day each. So, Monday, Tuesday
and Wednesday will have 5 days while the
others will have 4 days each.
Example 2:
Input:
N = 28, K = 5
Output:
5 5 5 4 4 4 4 
Explanation: Each day of the month will
have 4 days each and thus the Output.
 
Your Task:
You don't need to read input or print anything. Your task is to complete the function daysOfWeeks() which takes Integers N  and K as input and return a list of 7 integers indicating number of days in each day of the week.
 
Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)
 
Constraints:
1 <= N <= 10^{5}
1 <= K <= 7

Source: geeksforgeeks | Difficulty: EASY

Starter code: #User function Template for python3

class Solution:
    def daysOfWeeks(self, N ,K):
        # code here

Solutions:
class Solution:

	def daysOfWeeks(self, N, K):
		v = [N // 7, N // 7, N // 7, N // 7, N // 7, N // 7, N // 7]
		N = N % 7
		i = 0
		while N:
			a = (K - 1 + i) % 7
			v[a] += 1
			i += 1
			N -= 1
		return v


class Solution:

	def daysOfWeeks(self, N, K):
		a = N // 7
		lista = [a for i in range(7)]
		N = N % 7
		for i in range(N):
			j = (K + i) % 7
			j = int(j)
			lista[j - 1] += 1
		return lista


class Solution:

	def daysOfWeeks(self, N, K):
		c = N // 7
		l = [c] * 8
		r = N - c * 7
		k = K
		while r > 0:
			l[k] += 1
			k = k + 1
			if k >= 8:
				k = 1
			r = r - 1
		return l[1:]


class Solution:

	def daysOfWeeks(self, N, K):
		result = []
		days = N // 7
		result = [days for x in range(7)]
		remaining = N % 7
		for i in range(remaining):
			s = (K - 1) % 7
			result[s] = result[s] + 1
			K += 1
		return result


class Solution:

	def daysOfWeeks(self, N, K):
		n = N
		k = K
		r = n // 7
		l = [r] * 7
		s = n % 7
		for i in range(s):
			l[(k - 1) % 7] += 1
			k += 1
		return l


class Solution:

	def daysOfWeeks(self, N, K):
		c = N // 7
		a = [c, c, c, c, c, c, c]
		d = N - c * 7
		K -= 1
		for i in range(d):
			a[K] += 1
			K = (K + 1) % 7
		return a