結果

問題 No.966 引き算をして門松列(その1)
ユーザー kekurekekure
提出日時 2020-01-28 10:56:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 536 bytes
コンパイル時間 479 ms
コンパイル使用メモリ 10,952 KB
実行使用メモリ 8,656 KB
最終ジャッジ日時 2023-10-13 10:51:58
合計ジャッジ時間 1,409 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,536 KB
testcase_01 AC 19 ms
8,524 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque
N = int(input())

for n in range(N):
    a, b, c = map(int, input().split())
    if c > a:
        a, c = c, a

    if a == b == c and a >= 3:
        print(3)
    elif  b > a > c or a > c > b:
        print(0)
    elif a > b and b == c and b >= 2:
        print(1)
    elif a == b and b > c and c >= 2:
        print(2)
    elif a == c and b > a and a >= 2:
        print(1)
    elif a == c and b < a and b >= 2:
        print(2)
    elif c >= 2:
        print(b - c + 1)
    else:
        print(-1)





0