fork download
  1. m = int(input())
  2.  
  3. x2 = m % 3
  4. x1 = (m - 4 * x2) // 3
  5.  
  6. if x1 >= 0:
  7. print("{0} = 3*{1} + 4*{2}".format(m, x1, x2))
  8. else:
  9. print("Нет неотрицательных решений")
Success #stdin #stdout 0.03s 28376KB
stdin
17
stdout
17 = 3*3 + 4*2