結果
問題 |
No.820 Power of Two
|
ユーザー |
![]() |
提出日時 | 2019-08-22 15:18:14 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1,019 ms / 2,000 ms |
コード長 | 349 bytes |
コンパイル時間 | 373 ms |
コンパイル使用メモリ | 30,592 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 10:47:14 |
合計ジャッジ時間 | 5,169 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> int main(void) { int n,k,cnt=0; double pown,powk; scanf("%d %d",&n,&k); pown=pow(2,n); powk=pow(2,k); for(int i=1;i<=pown;i++) { if(i*powk<=pown) { cnt++; } } printf("%d",cnt); }