結果

問題 No.333 門松列を数え上げ
ユーザー kichirb3
提出日時 2018-03-04 11:18:03
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 432 bytes
コンパイル時間 176 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-07-07 02:57:31
合計ジャッジ時間 1,040 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 2 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-
"""
No.333 門松列を数え上げ
https://yukicoder.me/problems/no/333

"""
import sys
from sys import stdin
input = stdin.readline


def solve(A, B):
    if A == B:
        return 0
    if A < B:
        return A - 1
    if A > B:
        return 2000000000 - A


def main(args):
    A, B = map(int, input().split())
    ans = solve(A, B)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])
0