161. 간단한 논리 연산

김해준's avatar
Dec 31, 2025
161. 간단한 논리 연산

사용언어 : Java

문제
notion image
풀이
class Solution { public boolean solution(boolean x1, boolean x2, boolean x3, boolean x4) { boolean answer = true; boolean x5 = false; boolean x6 = false; boolean x7 = false; if(x1 || x2) x5 = true; if(x3 || x4) x6 = true; if(x5 && x6) x7 = true; return x7; } }
notion image
Share article