結果

問題 No.965 門松列が嫌い
ユーザー tachyon777tachyon777
提出日時 2020-01-17 20:24:15
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 230 bytes
コンパイル時間 300 ms
コンパイル使用メモリ 87,280 KB
実行使用メモリ 71,668 KB
最終ジャッジ日時 2023-09-07 22:23:28
合計ジャッジ時間 1,788 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,060 KB
testcase_01 AC 68 ms
71,560 KB
testcase_02 AC 74 ms
71,344 KB
testcase_03 WA -
testcase_04 AC 74 ms
71,248 KB
testcase_05 AC 73 ms
71,384 KB
testcase_06 AC 74 ms
71,136 KB
testcase_07 AC 73 ms
71,144 KB
testcase_08 AC 74 ms
71,428 KB
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b,c = map(int,input().split())
ans = 0
if a <= b <= c:
    print(0)
    exit()
if a ==c:
    print(abs(a-b)+1)
    exit()
if a > c:
    a,c = c,a

if b < a:
    ans = a-b+1

else:
    ans = b-c+1


ans = min(ans,c-a)
print(ans)
0