Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Module2/home_work/01_hw.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,11 @@
# Формат выходных данных
# Выведите «YES», если можно отломить от шоколадки ровно k долек, и «NO» иначе.

# TODO: your code here
chocolate_bar_size_by_x = int(input('Enter Chocolate Bar Size By \'X\': '))
chocolate_bar_size_by_y = int(input('Enter Chocolate Bar Size By \'Y\': '))
piece_of_chocolate_size = int(input('Enter Piece Of Chocolate Bar: '))

if piece_of_chocolate_size != chocolate_bar_size_by_x * chocolate_bar_size_by_y and (piece_of_chocolate_size == chocolate_bar_size_by_x or piece_of_chocolate_size == chocolate_bar_size_by_y):
print('YES')
else:
print('NO')