-- 예전 기록/BOJ

[ BOJ ] 15680 : 연세대학교 ( BRONZE 5 ) / C, Python

rejo 2023. 9. 22. 12:11

문제

연세대학교의 영문명은 YONSEI, 슬로건은 Leading the Way to the Future이다.

이를 출력하는 프로그램을 작성해보도록 하자.

입력

첫째 줄에 N이 주어진다. (N = 0 또는 1)

출력

  • N = 0일 경우: 연세대학교의 영문명을 출력한다.
  • N = 1일 경우: 연세대학교의 슬로건을 출력한다.

대소문자 구별에 주의하도록 하자.

풀이 과정

입력으로 들어오는 N이 0일 경우 YONSEI 를, N이 1일 경우 Leading the Way to the Future 를 출력한다.

C

#include <stdio.h>

int main(void) {
    int n;
    scanf("%d", &n);

    if (n == 0) printf("YONSEI");
    else printf("Leading the Way to the Future");
    
    return 0;
}

Python

print("YONSEI" if int(input()) == 0 else "Leading the Way to the Future")