blob: c928da648d7568dc7d4ed41af0f1e6e7db1e7e9b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
def get_Number(n, k):
arr = [0] * n;
i = 0;
odd = 1;
while (odd <= n):
arr[i] = odd;
i += 1;
odd += 2;
even = 2;
while (even <= n):
arr[i] = even;
i += 1;
even += 2;
return arr[k - 1];
|