問題一覧 > 教育的問題

No.2186 One-Sided Limit of a Power

レベル : / AI推定難易度 : 400 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 96
作問者 : 👑 p-adic / テスター : 👑 qand
お気に入りにしたユーザー ProblemId : 8409 / 自分の提出
問題文最終更新日: 2022-10-11 21:25:51
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 373 (順位表) の他の問題:

Problem Statement

Non-negative integers $A,B$ are given as input.

 

Consider the one-sided limit

$\displaystyle \lim_{x \to B + 0} A^x $

and find its value.

 

Below is an explanation for those who do not know the definition of the one-sided limit. (Click to expand)

 

Definition (One-Sided Limit)

There exists exactly one real number $\alpha$ satisfying the following condition:

  • For any positive real number $\epsilon$, there exists a positive real number $\delta$ satisfying the following condition:
    • For any positive real number $x$, if $0 < x - B < \delta$, then $|A^x - \alpha| < \epsilon$.

Such an $\alpha$ is written as

$\displaystyle \lim_{x \to B + 0} A^x $

in symbols.

Input

Input is given from Standard Input in the following format:

$A$
$B$

Constraints

The inputs $A,B$ satisfy the following constraints:

  • $A$ is a non-negative integer at most $10$
  • $B$ is a non-negative integer at most $10$

Output

Print the value of the one-sided limit

$\displaystyle \lim_{x \to B + 0} A^x $

on $1$ line, followed by a newline at the end.

 

It is known that this value is a non-negative integer under the constraints on $A,B$.

Print it without using a sign or a decimal point.

Sample

Sample 1
Input
1
2
Output
1

Here, $A = 1$ and $B = 2$.

Let us show that, when we set $\alpha = 1$, $\alpha$ qualifies as the one-sided limit

$\displaystyle \lim_{x \to B + 0} A^x $

by definition.

 

Let $\epsilon$ be a positive real number. Define the positive real number $\delta$ as $100$. For this $\delta$, consider the condition

"For any positive real number $x$, if $0 < x - B < \delta$, then $|A^x - \alpha| < \epsilon$."

It suffices to verify that this condition is satisfied.

 

Let $x$ be a positive real number with $0 < x - B < \delta$. Then,

$\displaystyle |A^x - \alpha| = |1^x - 1| = |1 - 1| = 0 < \epsilon $

holds, so we have confirmed that $\delta$ indeed satisfies the condition.

 

From the above, we have confirmed that $\alpha$ indeed qualifies as the one-sided inverse limit

$\displaystyle \lim_{x \to B + 0} A^x $

by definition.

Sample 2
Input
2
3
Output
8

Here, $A = 2$ and $B = 3$.

Let us show that, when we set $\alpha = 8$, $\alpha$ qualifies as the one-sided limit

$\displaystyle \lim_{x \to B + 0} A^x $

by definition.

 

Let $\epsilon$ be a positive real number. Define the real number $\delta$ by

$\displaystyle \delta = \log_2 \left( 1 + \frac{1}{8} \epsilon \right) $

Then this is positive, since it is obtained by applying $\log_2$ to a positive real number greater than $1$.

For this $\delta$, consider the condition

"For any positive real number $x$, if $0 < x - B < \delta$, then $|A^x - \alpha| < \epsilon$."

It suffices to verify that this condition is satisfied.

 

Let $x$ be a positive real number with $0 < x - B < \delta$. Then,

$\displaystyle |A^x - \alpha| = |2^x - 8| = 8 \times |2^{x-B} - 1| $

holds. From $0 < x - B < \delta$, we have

$\displaystyle 2^0 < 2^{x-B} < 2^{\delta} $

that is,

$\displaystyle 1 < 2^{x-B} < 1 + \frac{1}{8} \epsilon $

holds. Therefore, subtracting $1$ from each side gives

$\displaystyle 0 < 2^{x-B} - 1 < \frac{1}{8} \epsilon $

and in particular, by the definition of the absolute value,

$\displaystyle |2^{x-B} - 1| < \frac{1}{8} \epsilon $

holds. Combining this with the equality shown earlier,

$\displaystyle |A^x - \alpha| = 8 \times |2^{x-B} - 1| $

we obtain

$\displaystyle |A^x - \alpha| < \epsilon $

so we have confirmed that $\delta$ indeed satisfies the condition.

 

From the above, we have confirmed that $\alpha$ indeed qualifies as the one-sided inverse limit

$\displaystyle \lim_{x \to B + 0} A^x $

by definition.

Sample 3
Input
3
2
Output
9

Here, $A = 3$ and $B = 2$.

Let us show that, when we set $\alpha = 9$, $\alpha$ qualifies as the one-sided limit

$\displaystyle \lim_{x \to B + 0} A^x $

by definition.

 

Let $\epsilon$ be a positive real number. Define the real number $\delta$ by

$\displaystyle \delta = \log_3 \left( 1 + \frac{1}{9} \epsilon \right) $

Then this is positive, since it is obtained by applying $\log_3$ to a positive real number greater than $1$.

For this $\delta$, consider the condition

"For any positive real number $x$, if $0 < x - B < \delta$, then $|A^x - \alpha| < \epsilon$."

It suffices to verify that this condition is satisfied.

 

Let $x$ be a positive real number with $0 < x - B < \delta$. Then,

$\displaystyle |A^x - \alpha| = |3^x - 9| = 9 \times |3^{x-B} - 1| $

holds. From $0 < x - B < \delta$, we have $\displaystyle 3^0 < 3^{x-B} < 3^{\delta} $

that is,

$\displaystyle 1 < 3^{x-B} < 1 + \frac{1}{9} \epsilon $

holds. Therefore, subtracting $1$ from each side gives

$\displaystyle 0 < 3^{x-B} - 1 < \frac{1}{9} \epsilon $

and in particular, by the definition of the absolute value,

$\displaystyle |3^{x-B} - 1| < \frac{1}{9} \epsilon $

holds. Combining this with the equality shown earlier,

$\displaystyle |A^x - \alpha| = 9 \times |3^{x-B} - 1| $

we obtain

$\displaystyle |A^x - \alpha| < \epsilon $

so we have confirmed that $\delta$ indeed satisfies the condition.

 

From the above, we have confirmed that $\alpha$ indeed qualifies as the one-sided inverse limit

$\displaystyle \lim_{x \to B + 0} A^x $

by definition.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。