-
[python]백준 AFC 윔블던 4299번알고리즘 문제풀이/백준(파이썬) 2023. 5. 9. 23:36
코드
import sys sys.stdin = open("4299.txt", "r") a,b=map(int,input().split()) if a-b<0 or (a-b)%2!=0: print(-1) else: c=(a-b)//2 d=a-c print(max(c,d),min(c,d))
링크
https://www.acmicpc.net/problem/4299
'알고리즘 문제풀이 > 백준(파이썬)' 카테고리의 다른 글
[python]백준 핸드폰 요금 1267번 (0) 2023.05.11 [python]백준 베라의 패션 15439번 (0) 2023.05.10 [python]백준 그릇 7567번 (0) 2023.05.08 [python]백준 수학은 체육과목 입니다 15894번 (0) 2023.05.07 [python]백준 두 수의 합 3273번 (0) 2023.05.06