No.1723 [Cherry 3rd Tune *] Dead on
問題文最終更新日: 2021-10-29 18:16:58
English (AI translation)
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 320 (Stray Bullet)
(順位表)
の他の問題:
Problem Statement
Is $X^A$ a multiple of $Y^B$?
Constraints
- $1 \leq X,Y \leq 10^{12}$
- $1 \leq A,B \leq 10^{16}$
- All inputs are integers.
Input
The input is given from standard input in the following format.$X$ $A$ $Y$ $B$
Output
Print Yes if $X^A$ is a multiple of $Y^B$, and No otherwise.
Sample
Sample 1
Input
18 1 3 2
Output
Yes
$18^1=18$ is a multiple of $3^2=9$.
Sample 2
Input
2 4 5 2
Output
No
$2^4=16$ is not a multiple of $5^2=25$.
Sample 3
Input
100 9 100 9
Output
Yes
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
Kazun
tatyam
mine691