結果

問題 No.126 2基のエレベータ
ユーザー ゆるくゆるく
提出日時 2019-04-26 02:55:01
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 583 bytes
コンパイル時間 306 ms
コンパイル使用メモリ 10,832 KB
実行使用メモリ 10,464 KB
最終ジャッジ日時 2023-08-14 07:52:15
合計ジャッジ時間 2,643 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 29 ms
10,140 KB
testcase_02 AC 29 ms
10,220 KB
testcase_03 AC 29 ms
10,284 KB
testcase_04 AC 28 ms
10,172 KB
testcase_05 AC 30 ms
10,220 KB
testcase_06 AC 31 ms
10,260 KB
testcase_07 AC 30 ms
10,168 KB
testcase_08 AC 31 ms
10,292 KB
testcase_09 AC 30 ms
10,224 KB
testcase_10 AC 30 ms
10,264 KB
testcase_11 AC 30 ms
10,164 KB
testcase_12 AC 29 ms
10,420 KB
testcase_13 AC 30 ms
10,160 KB
testcase_14 AC 30 ms
10,224 KB
testcase_15 AC 28 ms
10,352 KB
testcase_16 WA -
testcase_17 AC 29 ms
10,208 KB
testcase_18 AC 29 ms
10,212 KB
testcase_19 AC 29 ms
10,256 KB
testcase_20 AC 29 ms
10,200 KB
testcase_21 AC 30 ms
10,324 KB
testcase_22 AC 29 ms
10,136 KB
testcase_23 AC 28 ms
10,352 KB
testcase_24 AC 28 ms
10,256 KB
testcase_25 AC 28 ms
10,252 KB
testcase_26 AC 29 ms
10,276 KB
testcase_27 AC 30 ms
10,160 KB
testcase_28 WA -
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

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