Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 365 Bytes

README.md

File metadata and controls

22 lines (16 loc) · 365 Bytes

46.Fraction Calculate

Description

  • 整数3表示成[3]
  • 整数-3表示成[-3]
  • 分数7/2表示成[3, 1, 2]
  • 分数-7/2表示成[-3, -1, 2]
  • 分数-1/2表示成[0, -1, 2]

Example

Input: [3], [-3], '+'
Output: [6]

Input: [1, 1, 2], [2], '/'
Output: [0, 3, 4]

Input: [-10], [0, -3, 8], '+'
Output: [-10, -3, 8]