📌  相关文章
📜  返回元组或 null - Go 编程语言 - Go 编程语言代码示例

📅  最后修改于: 2022-03-11 14:45:01.322000             🧑  作者: Mango

代码示例5
# return tuple or null
def solve s,g 
  s % g != 0 ? -1 : [g, s - g]
end
# FYI: the problem to solve is:
# Given the sum and gcd of two numbers, return the two numbers in ascending order.