본문 바로가기
백준

[백준] 15680번 : 연세대학교 – JAVA [자바]

by Hongwoo 2022. 8. 10.
반응형

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");
        }
    }
}

 

 

반응형

댓글