結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
16,072 KB
testcase_01 WA -
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|
    c += 1 if i % base == 0
end

puts(c)
0