10818
-
[Python] 백준 10,818 : 최소, 최대코딩테스트/백준 2024. 6. 19. 17:02
문제 [문제 풀기 전 생각한 부분]1. 코테는 보통 함수를 이용하니 함수를 이용해서 풀어보자2. 함수에 최대 최소를 출력하는 내장함수를 사용한다.[my_code]def minMax(nums): print(min(nums),max(nums))total = int(input())nums = map(int,input().split())minMax(nums)[문제점]1.처음에 iterable argument is empty 오류 [문제점 해결]1. list로 nums 를 받아보았다. def minMax(nums): print(min(nums),max(nums))total = int(input())nums = list(map(int,input().split()))minMax(nums) [왜 그럴지 더 ..