#CCBCHBA0000119. Liệt kê cặp chia hết (List Divisible Pairs)
Liệt kê cặp chia hết (List Divisible Pairs)
List Divisible Pairs
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given , list every pair satisfying and . Print one pair per line as i j, in ascending order of and then . If no pair exists, print nothing.
Input
One line contains integer .
Output
Print the pairs in the specified order, or empty output if none.
Subtasks
-
Subtask 1 (20%): .
-
Subtask 2 (30%): .
-
Subtask 3 (50%): .
Examples
Example 1
Input:
4
Output:
1 2
1 3
1 4
2 4
Explanation:
List multiples strictly greater than i, in increasing order; n=1 has empty output.
Example 2
Input:
1
Output:
Explanation:
List multiples strictly greater than i, in increasing order; n=1 has empty output.