結果

問題 No.820 Power of Two
ユーザー Tsukasa Noguchi
提出日時 2019-08-18 15:20:27
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 238 bytes
コンパイル時間 868 ms
コンパイル使用メモリ 77,528 KB
最終ジャッジ日時 2025-01-07 14:11:34
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cmath>

using namespace std;

int main() {
    int n, k;
    cin >> n >> k;
    if (n >= k) {
        cout << fixed << (int)pow(2, n -k) << endl;
    } else {
        cout << 0 << endl;
    }

    return 0;
}
0