#CCBCHBA0000112. Multiplication Table
Multiplication Table
Multiplication Table
Source: Codeforces
Version: Phuoc Hung OJ Extended
Problem Statement
Given an -by- multiplication table with cell for 1-based indices, count all cells whose value equals . Distinct positions count separately.
Input
One line contains integers .
Output
Print the number of cells equal to .
Subtasks
-
Subtask 1 (20%): ; .
-
Subtask 2 (30%): ; .
-
Subtask 3 (50%): ; .
Examples
Example 1
Input:
10 5
Output:
2
Explanation:
Cells with product 5: (1, 5), (5, 1); total 2.
Example 2
Input:
6 12
Output:
4
Explanation:
Cells with product 12: (2, 6), (3, 4), (4, 3), (6, 2); total 4.