변장탐지
2026년 12월 3일 09:30분
열왕기상 14장에서 여로보암의 아내는 병든 아들의 일을 묻기 위해 변장하고 아히야를 찾아갑니다. 아히야는 눈이 어두워도 그녀의 정체를 알아보고, 아들의 죽음과 집안의 심판을 예언합니다. 나는 신분을 숨긴 요청을 실제 정체와 대조해 걸러내는 검사를 구현했습니다.
package com.jesusbornd.kings1;
public class Kings1_14_Chapter_Lv2 {
record Visitor(String disguised, String real) {}
static void receive(Visitor v) {
if (!v.disguised().equals(v.real())) {
System.out.println("🎭 변장 감지: " + v.disguised() + " → 실제 " + v.real() + " — 예언 전달");
} else {
System.out.println("✅ 일반 요청: " + v.real());
}
}
public static void main(String[] args) {
receive(new Visitor("평범한 아낙", "여로보암의 아내"));
receive(new Visitor("여로보암의 아내", "여로보암의 아내"));
}
}
def receive(disguised: str, real: str):
if disguised != real:
print(f"🎭 변장 감지: {disguised} → 실제 {real} — 예언 전달")
else:
print(f"✅ 일반 요청: {real}")
receive("평범한 아낙", "여로보암의 아내")
receive("여로보암의 아내", "여로보암의 아내")
Search
Categories
← 목록으로
Comments
겉모습을 바꾼 요청도 실제 정체를 확인하면 드러납니다.