Python Operators (2) 썸네일형 리스트형 [코딩테스트 입문] 개미 군단 개미 군단1안) solution.pydef solution(hp): answer = 0 a = hp // 5 b = (hp % 5) // 3 c = (hp % 5) % 3 answer = a + b + c return answer2안) solution.pydef solution(hp): answer = 0 answer = (hp // 5) + ((hp % 5) // 3) + ((hp % 5) % 3) return answer3안) solution.pydef solution(hp): answer = 0 a = divmod(hp, 5) b = divmod(a[1], 3) c = divmod(b[1], 1.. python 연산자(Python Operators) python 연산자(Python Operators) 산술 연산자(Arithmetic operators) 할당 연산자(Assignment operators) 비교 연산자(Comparison operators) 논리 연산자(Logical operators) 식별 연산자(Identity operators) 멤버 연산자(Membership operators) 비트 연산자(Bitwise operators) 산술 연산자(Arithmetic operators) x = 5, y = 3 Operator Name Example + 더하기(Addition) x + y → 8 - 빼기(Subtraction) x - y → 2 * 곱하기(Multiplication) x * y → 15 / 나누기(Division) x / y →.. 이전 1 다음