結果

問題 No.820 Power of Two
コンテスト
ユーザー k.h
提出日時 2019-08-07 10:04:21
言語 Go
(1.26.1)
コンパイル:
env GOCACHE=/tmp go build _filename_
実行:
./Main
結果
AC  
実行時間 1,053 ms / 2,000 ms
コード長 246 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 10,811 ms
コンパイル使用メモリ 281,936 KB
実行使用メモリ 289,908 KB
最終ジャッジ日時 2026-04-02 11:59:35
合計ジャッジ時間 17,756 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

package main

import (
	"fmt"
	"math"
)

func main() {
	var n, k, ans int
	fmt.Scan(&n, &k)
	l, d := int(math.Pow(2, float64(n))), int(math.Pow(2, float64(k)))
	for i := 1; i <= l; i++ {
		if d*i > l {
			break
		}
		ans++
	}
	fmt.Println(ans)
}
0