結果

問題 No.126 2基のエレベータ
ユーザー ゆるく
提出日時 2019-04-26 02:05:33
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 572 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,904 KB
最終ジャッジ日時 2024-11-21 23:54:09
合計ジャッジ時間 2,404 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: UTF-8
import sys
#sys.setrecursionlimit(n)
import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

a, b, c = map(int, input().split())
count = 0
off = 0
if a == 0:
    a += 1
    b += 1
    c += 1
    off = 1
if c == 1 + off:
    count += a + off
else:
    aa = abs(a - c) + off
    bb = abs(b - c) + off
    if aa > bb:
        count += bb
        count += min(a + c - 1 + off, aa + a + off)
    else:
        count += aa + c + off
print(count)
0