반응형

백준 15680번 연세대학교 풀이 코드

C | C++ | Java | Python


풀이

입력값이 0이면 '연세대학교', 1이면 'Leading the Way to the Future'를 출력합니다.

코드

#include<stdio.h>
int main(){
    int N;
    scanf("%d", &N);
    if (N == 1)
        printf("Leading the Way to the Future");
    else
        printf("YONSEI");
    return 0;
}
#include<iostream>
using namespace std;
int main(){
    int N;
    cin>>N;
    if(N == 1)
       cout<<"Leading the Way to the Future"<<endl;
    else
        cout<<"YONSEI"<<endl;
    return 0;
}
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N;
        N = sc.nextInt();
        if( N == 1 )
            System.out.println("Leading the Way to the Future");
        else
            System.out.println("YONSEI");
    }
}
N = int(input())
if N == 1:
    print("Leading the Way to the Future")
else:
    print("YONSEI")

문제 출처

https://www.acmicpc.net/problem/15680

반응형

+ Recent posts