結果

問題 No.820 Power of Two
ユーザー benzenetaroubenzenetarou
提出日時 2019-06-05 23:51:51
言語 Ruby
(3.3.0)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 263 bytes
コンパイル時間 611 ms
コンパイル使用メモリ 11,828 KB
実行使用メモリ 16,056 KB
最終ジャッジ日時 2023-10-23 19:56:12
合計ジャッジ時間 2,294 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

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

# c = 0
# これは2**30とかになったら計算バカかかるのでボツ
# max.times do |i|
#     if (i+1) % base == 0
#         c += 1
#     end
# end

ans = (max / base)
puts(ans)
0