haju__log

[python][SWEA][D3] 3431. 준환이의 운동관리 본문

SWEA

[python][SWEA][D3] 3431. 준환이의 운동관리

haju 2023. 5. 5. 16:30

https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=2&problemLevel=3&contestProbId=AWE_ZXcqAAMDFAV2&categoryId=AWE_ZXcqAAMDFAV2&categoryType=CODE&problemTitle=&orderBy=PASS_RATE&selectCodeLang=ALL&select-1=3&pageSize=10&pageIndex=1 

 

SW Expert Academy

SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!

swexpertacademy.com

 

T=int(input())

for test_case in range(1,T+1):
    l,u,x=map(int,input().split())
    if x>u:
        print("#%d %d" %(test_case,-1))
    elif x<l:
        print("#%d %d" %(test_case,l-x))
    elif x>=l:
        print("#%d %d" % (test_case, 0))