Mathematic problem

Revision en1, by dangthanhmay, 2025-08-15 10:31:33

I have a math problem at school, but i haven't idea how to solve this problem

Given three natural numbers $$$n, a, b$$$. We define a pair $$$(x, y)$$$ as a beautiful pair if it satisfies all the following conditions:

  • $$$1 \leq x \leq a$$$
  • $$$1 \leq y \leq b$$$
  • $$$(x \times y)$$$ is divisible by $$$(x + y)$$$ and the division result does not exceed $$$n$$$.
  • $$$x$$$ and $$$y$$$ are natural numbers.

Requirement: Count the number of pairs $$$(x, y)$$$ that satisfy the conditions above and are considered beautiful pairs.

Input

  • Contains three natural numbers $$$n, a, b$$$ $$$(1 \leq n, a, b \leq 10^{10})$$$.
  • The data ensures that the result of the problem will not exceed $$$10^{18}$$$.

Output

  • Print the result after performing the required task.

can you help me how to solve this problem

(I use a translator to write this post, sorry for my bad English)

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English dangthanhmay 2025-08-15 10:39:59 34 Tiny change: ' task.\n\ncan yo' -> ' task.\n\ntime limit per test: 2 seconds\n\ncan yo'
en1 English dangthanhmay 2025-08-15 10:31:33 890 Initial revision (published)