[파이썬][백준 15680번] 연세대학교
1. 문제Permalink
[Bronze IV] 연세대학교 - 15680Permalink
성능 요약Permalink
메모리: 30840 KB, 시간: 68 ms
분류Permalink
구현(implementation)
문제 설명Permalink
연세대학교의 영문명은 YONSEI, 슬로건은 Leading the Way to the Future이다.
이를 출력하는 프로그램을 작성해보도록 하자.
입력Permalink
첫째 줄에 N이 주어진다. (N = 0 또는 1)
출력Permalink
- N = 0일 경우: 연세대학교의 영문명을 출력한다.
- N = 1일 경우: 연세대학교의 슬로건을 출력한다.
대소문자 구별에 주의하도록 하자.
출처: 백준, https://https://www.acmicpc.net/
2. 해결방법 시간복잡도Permalink
- 단순 코딩 O(1)
3. 문제 해결 및 코드Permalink
This file contains hidden or 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
N = int(input()) | |
if N == 0: print("YONSEI") | |
elif N == 1: print("Leading the Way to the Future") |
-
주석을 참고하면서 이해를 돕습니다.Permalink
4. 알고리즘 및 해설Permalink
- if문을 통해 경우의 수에 따라 결과문을 출력해준다.