1. 랭작!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.io.*; | |
/** | |
* https://www.acmicpc.net/problem/15680 | |
* BOJ 백준온라인져지 15680 연세대학교 풀이 | |
*/ | |
public class Main { | |
private static BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); | |
public static void main(String args[]) throws IOException { | |
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | |
int N = Integer.parseInt(br.readLine()); | |
bw.write(N == 0 ? "YONSEI" : "Leading the Way to the Future"); | |
bw.flush(); | |
} | |
} |
문제
연세대학교의 영문명은 YONSEI, 슬로건은 Leading the Way to the Future이다.
이를 출력하는 프로그램을 작성해보도록 하자.
입력
첫째 줄에 N이 주어진다. (N = 0 또는 1)
출력
- N = 0일 경우: 연세대학교의 영문명을 출력한다.
- N = 1일 경우: 연세대학교의 슬로건을 출력한다.
대소문자 구별에 주의하도록 하자.
예제 입력 1
0
예제 출력 1
YONSEI
힌트
출처
'IT > 알고리즘' 카테고리의 다른 글
BOJ 백준온라인져지 9827 아즈텍 피라미드 풀이 (0) | 2018.05.10 |
---|---|
BOJ 백준온라인져지 15708 미네크래프트 풀이 (0) | 2018.05.09 |
BOJ 백준온라인져지 2909 캔디 구매 풀이 (0) | 2018.05.07 |
BOJ 백준온라인져지 10709 기상캐스터 풀이 (0) | 2018.05.04 |
BOJ 백준온라인져지 2470 두 용액 풀이 (0) | 2018.05.04 |