
백준 - 라디오 3135
2023. 2. 16. 17:29
알고리즘(BOJ)/Silver
문제 분석 처음지점 - 마지막 지점 의 값과 바로가기 버튼 - 마지막 지점 의 값을 비교만 하면된다. 절대값으로 비교해야 하기에 Math.abs를 이용했다. 전체 소스 package test; import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()," "); int start = Integer.parseInt(st.nextTok..