No.820 Power of Two
問題文最終更新日: 2019-04-26 21:27:24
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 212
(順位表)
の他の問題:
Problem Statement
You are given non-negative integers $N,K$. Find the number of $x$ satisfying the following condition.
Condition: $x$ is a positive integer satisfying $1\le x\le 2^N$, and $x$ is a multiple of $2^K$.
Input
$N$ $K$
$0\le N,K\le 30$
Output
Print the number of $x$ satisfying the condition. Print a newline at the end.
Sample
Sample 1
Input
5 3
Output
4
$x=8,16,24,32$ satisfy the condition.
Sample 2
Input
5 10
Output
0
There may be no $x$ satisfying the condition.
Sample 3
Input
30 0
Output
1073741824
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
Pulmn
ixmel