問題一覧 > 通常問題

No.2450 99-like Number

レベル : / AI推定難易度 : 101 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 238
作問者 : srjywrdnprkt / テスター : 👑 p-adic
お気に入りにしたユーザー ProblemId : 9834 / 自分の提出
問題文最終更新日: 2023-10-28 19:45:32
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 403 (順位表) の他の問題:

Problem Statement

A positive integer $A$ satisfying the following condition is called a $99$-like number.

  • There exists a positive integer $k$ such that $A+1=10^k$.
Given a positive integer $N$, determine whether $N$ is a $99$-like number.

Input

$N$

All inputs are integers and satisfy the following constraints.

  • $1 \leq N \leq 10^{100}$

Output

Print Yes if $N$ is a $99$-like number, and No otherwise. Print a newline at the end.

Sample

Sample 1
Input
99
Output
Yes

$N+1 = 100$. Taking $k=2$ gives $100 = 10^2$, so $99$ is a $99$-like number.

Sample 2
Input
123456789012345678901234567890
Output
No

$N$ may not fit in a $64$ bit integer.

Sample 3
Input
1
Output
No

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