問題一覧 > 通常問題

No.820 Power of Two

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 551
作問者 : Pulmn / テスター : ixmel
お気に入りにしたユーザー ProblemId : 2902 / 自分の提出
問題文最終更新日: 2019-04-26 21:27:24
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もしくは右上の雲マークをクリックしてアカウントを作成してください。