정결하라
2026년 1월 26일 14:58분
package com.jesusbornd.exodus;
public class Exodus_19_Chapter_Lv2 {
static void require(boolean condition, String message) {
if (!condition) throw new IllegalStateException(message);
}
public static void main(String[] args) {
boolean washed = true;
boolean ready = true;
require(washed, "준비 실패 / Preparation failed: washed=false");
require(ready, "준비 실패 / Preparation failed: ready=false");
System.out.println("준비 완료 / Ready");
}
}
def require(condition: bool, message: str):
if not condition:
raise RuntimeError(message)
washed = True
ready = True
require(washed, "준비 실패 / Preparation failed: washed=False")
require(ready, "준비 실패 / Preparation failed: ready=False")
print("준비 완료 / Ready")
Search
Categories
← 목록으로
Comments
아직 댓글이 없습니다!