When positive integer k is divided by 5, the remainder is 2. When k is divided by 6, the remainder is 5. If k is less than 38, what is the remainder when k is divided by 7?  Choose the correct answer
A) 2
B) 4
C) 3
D) 5
E) 6

Rationale: "cant think of a straight approach but here is how i solved it : k is divided by 5 and remainder is 2 . this means k = 5 n + 2 ( n is an integer ) so the possible values of k = { 2 , 7 , 12 , 17 , 22 , 27 , 32 , 37 } ( less than 38 ) secondly , if k is divided by 6 , the remainder is 5 = > k = 6 m + 5 so the possible value set for k = { 5 , 11 , 17 , 23 , 29,35 } ( less than 38 ) 17 is the only common number in both the sets . hence k = 17 answer : c"
Answer: C