Data Structures & AlgorithmsVery hardCodeforces Div2 B-D · ICPC regional
How many ordered pairs (a, b) of integers with a >= 2 and b >= 2 satisfy a * b = 36?
- A. 7
- B. 8
- C. 4
- D. 9
Correct answer: A. 7
Divisors of 36 from 2 to 18 pair up in ordered form: 2x18, 3x12, 4x9, 6x6, 9x4, 12x3, 18x2 give 7 ordered pairs. Counting only unordered pairs (second option) gives 4.
Practise more Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questionsArrays, Strings, Linked Lists, Stacks, Queues and Hashing: notes and key points
More Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questions
- Moving one unit per step, what is the minimum total number of unit moves to make every element of [1, 2, 9, 10, 12] equal to a common…
- How many index triples i < j < k in [1, 2, 3, 4, 5, 6] satisfy a[i] + a[k] = 2 a[j]?
- What is the area of the largest rectangle under the histogram [3, 1, 3, 2, 2]?
- How many distinct XOR values arise from index pairs i < j of [1, 2, 3, 4]?
- How many non-empty prefixes of "abacaba" are palindromes?
- What is the minimum number of single-character flips needed to turn the binary string "10100101" into a string of the form 0...01...1 (all…