[BaekJoon] 33701번 - 새천년관 [Java][C++]
[BaekJoon] 33701번 - 새천년관 [Java][C++]
1. 문제 풀이
주어진 조건을 만족하는 이름을 출력하면 되는 문제로 건물 이름이 gwan으로 끝나야하며 맨 앞 글자와 맨 뒤 글자가 같아야해서 n으로 시작해야 한다. 중간에 k와 u를 적절히 넣어주면 된다.
2. 코드
1. 풀이 [Java]
1
2
3
4
5
public class Main {
public static void main(String[] args) {
System.out.println("nkugwan");
}
}
2. 풀이 [C++]
1
2
3
4
5
6
7
8
9
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout << "nkugwan";
}
This post is licensed under CC BY 4.0 by the author.