結果

問題 No.333 門松列を数え上げ
ユーザー Hachimori
提出日時 2016-03-06 12:08:50
言語 Python2
(2.7.18)
結果
AC  
実行時間 11 ms / 2,000 ms
コード長 260 bytes
コンパイル時間 52 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-24 14:40:37
合計ジャッジ時間 620 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python
#coding:utf8

def read():
    return map(int, raw_input().split())


def work((A, B)):
    if A < B:
        print (A - 1) + (B - A - 1)
    else:
        print (2000000000 - A) + (A - B - 1)


if __name__ == "__main__":
    work(read())
0