본문 바로가기
python-algorithm

백준 25784 Easy-to-Solve Expressions

by 무적김두칠 2022. 10. 26.

https://www.acmicpc.net/problem/25784

 

25784번: Easy-to-Solve Expressions

When one looks at a set of numbers, one usually wonders if there is a relationship among them? This task is more manageable if there are only three numbers. Given three distinct positive integers, you are to determine how one can be computed using the othe

www.acmicpc.net

 

1
2
3
4
5
6
7
8
nums=list(map(int, input().split()))
nums.sort()
if nums[0]+nums[1== nums[2]:
    print(1)
elif nums[0]*nums[1== nums[2]:
    print(2)
else:
    print(3)
cs

정렬 후 조건문
Sort numbers, and Use If clause

반응형

'python-algorithm' 카테고리의 다른 글

백준 5613 계산기 프로그램  (0) 2022.10.26
백준 4447 좋은놈 나쁜놈  (0) 2022.10.26
백준 25704 출석 이벤트  (0) 2022.10.26
백준 9253 스페셜 저지  (0) 2022.10.25
백준 8949 대충 더해  (0) 2022.10.24

댓글