forked from ndb796/python-for-coding-test
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1.py
More file actions
17 lines (14 loc) · 418 Bytes
/
1.py
File metadata and controls
17 lines (14 loc) · 418 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
n = input()
length = len(n) # 점수 값의 총 자릿수
summary = 0
# 왼쪽 부분의 자릿수의 합 더하기
for i in range(length // 2):
summary += int(n[i])
# 오른쪽 부분의 자릿수의 합 빼기
for i in range(length // 2, length):
summary -= int(n[i])
# 왼쪽 부분과 오른쪽 부분의 자릿수 합이 동일한지 검사
if summary == 0:
print("LUCKY")
else:
print("READY")