[BaekJoon] 15680번 - 연세대학교 [Java][C++]
[BaekJoon] 15680번 - 연세대학교 [Java][C++]
1. 문제 풀이
조건문을 활용해 주어진 양식에 맞춰 출력하면 된다.
2. 코드
1. 풀이 [Java]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import java.io.*;
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) {
System.out.println("YONSEI");
} else {
System.out.println("Leading the Way to the Future");
}
}
}
2. 풀이 [C++]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
if (n == 0) {
cout << "YONSEI";
} else {
cout << "Leading the Way to the Future";
}
}
This post is licensed under CC BY 4.0 by the author.