結果
問題 | No.333 門松列を数え上げ |
ユーザー | kichirb3 |
提出日時 | 2018-03-04 11:23:32 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 29 ms / 2,000 ms |
コード長 | 464 bytes |
コンパイル時間 | 201 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-07-07 03:07:55 |
合計ジャッジ時間 | 925 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 7 |
ソースコード
# -*- 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) + (B - A - 1) if A > B: return (2000000000 - A) + (A - B - 1) def main(args): A, B = map(int, input().split()) ans = solve(A, B) print(ans) if __name__ == '__main__': main(sys.argv[1:])