반응형
https://www.acmicpc.net/problem/15680
15680번: 연세대학교
연세대학교의 영문명은 YONSEI, 슬로건은 Leading the Way to the Future이다. 이를 출력하는 프로그램을 작성해보도록 하자.
www.acmicpc.net
- 문제
- 문제 풀이
백준 15680번 연세대학교는 브론즈 4 난이도의 구현 문제이다. 이 문제에서는 N이 입력으로 주어진다. 그리고 N이 0일 때 연세대학교의 영문명 YONSEI를 출력하고 N이 1일 때 연세대학교의 슬로건 Leadiing the Way to the Future를 출력하면 된다.
자세한 코드는 밑에 있다.
- 코드
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
if (n == 0) { //0 일때 영문명 출력
System.out.print("YONSEI");
} else { //N = 1일때 슬로건 출력
System.out.print("Leading the Way to the Future");
}
}
}
반응형
'백준' 카테고리의 다른 글
[백준] 10987번 : 모음의 개수 – JAVA [자바] (0) | 2022.08.10 |
---|---|
[백준] 11365번 : !밀비 급일 – JAVA [자바] (0) | 2022.08.10 |
[백준] 15964번 : 이상한 기호 – JAVA [자바] (0) | 2022.08.10 |
[백준] 15740번 : A+B - 9 – JAVA [자바] (0) | 2022.08.10 |
[백준] 9086번 : 문자열 – JAVA [자바] (0) | 2022.08.10 |
댓글