結果

問題 No.126 2基のエレベータ
ユーザー ゆるくゆるく
提出日時 2019-04-26 03:02:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 612 bytes
コンパイル時間 353 ms
コンパイル使用メモリ 10,912 KB
実行使用メモリ 10,320 KB
最終ジャッジ日時 2023-08-14 08:17:10
合計ジャッジ時間 2,939 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 31 ms
10,152 KB
testcase_03 AC 31 ms
10,184 KB
testcase_04 AC 31 ms
10,184 KB
testcase_05 AC 31 ms
10,220 KB
testcase_06 AC 32 ms
10,212 KB
testcase_07 WA -
testcase_08 AC 32 ms
10,180 KB
testcase_09 AC 31 ms
10,292 KB
testcase_10 AC 33 ms
10,224 KB
testcase_11 AC 32 ms
10,128 KB
testcase_12 AC 32 ms
10,280 KB
testcase_13 AC 31 ms
10,204 KB
testcase_14 AC 32 ms
10,256 KB
testcase_15 AC 31 ms
10,208 KB
testcase_16 WA -
testcase_17 AC 31 ms
10,132 KB
testcase_18 AC 31 ms
10,152 KB
testcase_19 AC 31 ms
10,204 KB
testcase_20 AC 31 ms
10,260 KB
testcase_21 AC 32 ms
10,148 KB
testcase_22 AC 32 ms
10,228 KB
testcase_23 AC 31 ms
10,168 KB
testcase_24 AC 32 ms
10,276 KB
testcase_25 AC 32 ms
10,148 KB
testcase_26 AC 31 ms
10,148 KB
testcase_27 AC 30 ms
10,176 KB
testcase_28 AC 31 ms
10,128 KB
testcase_29 AC 31 ms
10,296 KB
権限があれば一括ダウンロードができます

ソースコード

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
a += 1
b += 1
c += 1
aa = abs(a - c)
bb = abs(b - c)
if c == 2:
    count += abs(a - 2) + 1
elif aa > bb:
    if b >= c:
        count += b - 2
    else:
        count += bb + c - 2
    if a > c:
        count += abs(a - 2)
    count += 1
else:
    if a >= c:
        count += a - 2 + 1
    else:
        count += aa + c - 2 + 1
print(count)
0