結果

問題 No.820 Power of Two
コンテスト
ユーザー proribone
提出日時 2019-06-03 15:26:29
言語 C(gnu17)
(gcc 15.3.0)
コンパイル:
gcc-15 -O2 -std=gnu17 -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types -Wno-error=int-conversion -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 308 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 259 ms
コンパイル使用メモリ 38,864 KB
実行使用メモリ 9,844 KB
最終ジャッジ日時 2026-10-13 03:59:28
合計ジャッジ時間 4,662 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12 TLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include<stdio.h>
#include<math.h>

int main(){
  int n,k;
  int i;
  int c=0;
  int tmp;
  scanf("%d%d",&n,&k);
  int a=(pow(2,n));
  int b=(pow(2,k));
  for(i=1;i<=a&&c==0;i++){
    if(i%b==0){
      c++;
      tmp=i;
    }
  }
  if(c!=0){
  printf("%d\n",a/tmp);
}else{
  printf("%d",0);
}

  return 0;
}
0