C++)
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
string a, b;
cin >> a >> b;
reverse(a.begin(), a.end());
reverse(b.begin(), b.end());
cout << max(a, b);
return 0;
}
Python)
import sys
read = sys.stdin.readline
a,b = read().rstrip().split()
print(max(a[::-1],b[::-1]))'백준 1 > 기초' 카테고리의 다른 글
| [백준 8912] Sales (C++/Python) (0) | 2020.12.05 |
|---|---|
| [백준 2775] 부녀회장이 될테야 (C++/Python) (0) | 2020.12.05 |
| [백준 1316] 그룹 단어 체커 (C++/Python) (0) | 2020.12.05 |
| [백준 10824] 네 수 (C++/Python) (0) | 2020.12.05 |
| [백준 10808] 알파벳 개수 (C++ / Python) (0) | 2020.12.05 |