Data Structures & AlgorithmsVery hardGATE CS · TCS NQT

How many integers n with 1 <= n <= 1000 have n^2 divisible by 36?

  1. A. 167
  2. B. 166
  3. C. 27
  4. D. 165

Correct answer: B. 166

n^2 divisible by 36 = 2^2 * 3^2 is equivalent to n divisible by 6, since each exponent must be at least 1. There are 166 multiples of 6 up to 1000.

More Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questions

Exams that ask this topic