結果

問題 No.820 Power of Two
ユーザー 29da164
提出日時 2020-07-24 12:04:36
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 199 bytes
コンパイル時間 603 ms
コンパイル使用メモリ 66,948 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-24 22:54:52
合計ジャッジ時間 1,428 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cmath>
int main(void){
  int n,k;
  long long x;
  std::cin >> n >> k;
  x=std::pow(2,n-k);
  if(n>=k) std::cout << x << std::endl;
  else std::cout << 0 << std::endl;
}
0