Блог пользователя _LNHTD_

Автор _LNHTD_, история, 3 года назад, По-английски

Given $$$L,R (1 \leq L \leq R \leq 10^{18})$$$.

Count how many number $$$n=\overline{d_1d_2...d_k}$$$ that have $$$Q = n * d_1 * d_2 * \dots * d_k$$$ and $$$L \leq Q \leq R.$$$

I have done some calculation and found out that there are about $$$40000$$$ to $$$60000$$$ different possible product of digits: $$$d_1 * d_2 * \dots * d_k$$$. But I don't know any possible algorithm at all. Please help me! Thanks <3.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +46
  • Проголосовать: не нравится

Автор _LNHTD_, история, 4 года назад, По-английски

Recently, I have come across a problem that need to find a path from $$$S$$$ to $$$T$$$ like these :

I have tried to do a dfs with order like: up (-1, 0) , right (0, 1), down (1, 0), left(0, -1) (Suppose $$$S$$$ is (1, 1) and $$$T$$$ is (n, m) ). However it fails cases like this

I tried to google it too (but don't know how to use which words to describe this so fail finding anything.). I wonder if there is any algorithm for this.

Thanks anyway <3

Полный текст и комментарии »

  • Проголосовать: нравится
  • +12
  • Проголосовать: не нравится

Автор _LNHTD_, история, 4 года назад, По-английски

The problem is : We are given perimeter (P) of a triangle. We need to find the number of triplet edges (a, b, c) of a triangle, so that three edges are all integer, the area and the length of the radius of the incircle and circumcircle is also an integer.

In the solution, they have an observation that : In order to exist at least a triplet satisfy the problem, 4 must be a divisor of P (perimeter) and a, b, c (three edges) must be all even.

I have proofed all a, b, c are even. But I can't figure out how 4 is a divisor of P.

Could someone help me to proof this ? Thanks in advance!!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +21
  • Проголосовать: не нравится