← Back to List

26517번: 연속인가? ? ↗

Solutions

Python 3
135 B | 135 chars
k = int(input())
a, b, c, d = map(int, input().split())

x = a * k + b
y = c * k + d

if x == y:
  print('Yes', x)
else:
  print('No')