結果

問題 No.820 Power of Two
ユーザー benzenetaroubenzenetarou
提出日時 2019-06-05 23:42:34
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 159 bytes
コンパイル時間 246 ms
コンパイル使用メモリ 11,936 KB
実行使用メモリ 20,476 KB
最終ジャッジ日時 2023-10-23 19:43:19
合計ジャッジ時間 4,127 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
16,080 KB
testcase_01 AC 82 ms
16,080 KB
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

# 入力受け取り
N, K = gets.split.map(&:to_i)

max = 2**N
base = 2**K

c = 0
max.times do |i|
    if (i+1) % base == 0
        c += 1
    end
end

puts(c)
0