2
$\begingroup$

$F_4(X)$ be the number of digits 4 in the decimal representation of $X$, and $F_7(X)$ be the number of digits 7 in the decimal representation of $X$. We have to find largest product $F_4(X)\cdot F_7(X)$, where $L \leq X \leq R$.

$$\max\{F_4(X)\cdot F_7(X) : L ≤ X ≤ R\}$$

can a general solution be acheived?

eg:

$L=47$ AND $R=74$

$$\max\{F_4(X)\cdot F_7(X)\}=1$$

  • 0
    Are we dealing with integers here?2012-06-06
  • 0
    yes we dealing with integers here2012-06-06
  • 0
    What if $X$ is an irrational number? Then the product is unbounded.2012-06-06
  • 1
    An irrational integer? Numbers gone mad, maybe?2012-06-06
  • 0
    no X would not be irrartional2012-06-06
  • 0
    Sorry, didn't see the comment. If X is an integer, then the decimal representation is either $X.00000...$ or $(X-1).99999999...$ ?2012-06-06
  • 0
    the range is 1 ≤ L ≤ R ≤ 10^18 and x is simple interger2012-06-06

1 Answers 1