백준 #23825번 SASA 모형을 만들어보자

jhj·2024년 2월 14일

백준 JAVA

목록 보기
289/583
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int m = sc.nextInt();
		
		n = n / 2;
		m = m / 2;
		
		if(n < m) {
			System.out.println(n);
		}else {
			System.out.println(m);
		}
		sc.close();
	}
}
profile
개발자를 꿈꾸는

0개의 댓글