728x90
반응형

문제 주소: codeforces.com/problemset/problem/112/A

간단한 문자열 문제이다.

파이썬은 별도의 함수를 사용하지 않아도 문자열 비교가 바로바로 되어서 참 편한 것 같다.

s1 = input().lower()
s2 = input().lower()
if s1 == s2:
    print(0)
elif s1 < s2:
    print(-1)
else:
    print(1)
728x90
반응형

'Agorithm > Codeforces' 카테고리의 다른 글

339A-Helpful Maths  (0) 2021.02.16
263A-Beautiful Matrix  (0) 2021.02.16
282A-Bit++  (0) 2021.02.16
118A-String Task  (0) 2021.02.16
50A-Domino piling  (0) 2021.02.16

+ Recent posts