알고리즘 공부/백준 문제풀이
[백준] 15680 : 연세대학교(JAVA)
송테이토
2022. 10. 5. 00:55
백준 15680 자바
연세대학교
문제
연세대학교의 영문명은 YONSEI, 슬로건은 Leading the Way to the Future이다.
이를 출력하는 프로그램을 작성해보도록 하자.
입력
첫째 줄에 N이 주어진다. (N = 0 또는 1)
출력
- N = 0일 경우: 연세대학교의 영문명을 출력한다.
- N = 1일 경우: 연세대학교의 슬로건을 출력한다.
대소문자 구별에 주의하도록 하자.
예제 입력 1
0
예제 출력 1
YONSEI
시간 제한 메모리 제한 제출 정답 맞힌 사람 정답 비율
1 초 | 128 MB | 9076 | 6740 | 6173 | 75.299% |
코드
import java.util.Scanner;
public class B15680 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
sc.close();
if (N == 0) {
System.out.println("YONSEI");
} else {
System.out.println("Leading the Way to the Future");
}
}
}