結果

問題 No.333 門松列を数え上げ
ユーザー ebicochinealebicochineal
提出日時 2016-06-06 00:22:58
言語 Go
(1.22.1)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 783 bytes
コンパイル時間 12,513 ms
コンパイル使用メモリ 233,192 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-19 08:22:38
合計ジャッジ時間 11,290 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 2 ms
5,248 KB
testcase_02 AC 2 ms
5,248 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import (
    "bufio"
    "fmt"
    "os"
    "strconv"
)

func main() {
    var A, B int;
    fmt.Scanf("%d %d", &A, &B)
    if A < B {
        Print(B-2)
    } else {
        Print(2000000000-B-1)
    }
}

func Print(x ...interface{}){
    l := len(x) + 1
    for ii, vi := range x {
        fmt.Print(vi)
        if ii == l {
            fmt.Print("\n")
        } else {
            fmt.Print(" ")
        }
    }
}
var sc = bufio.NewScanner(os.Stdin)
func Input() string {
    sc.Scan()
    return sc.Text()
}
func InputInt() int {
    sc.Scan()
    i, e := strconv.Atoi(sc.Text())
    if e != nil {panic(e)}
    return i
}
func BinCount(x int) int {
    s := fmt.Sprintf("%b", x)
    c := 0
    for _, i := range s {
        if i == '1' {c += 1}
    }
    return c
}
0