Skip to content

Opposite number #31

@freedom5566

Description

@freedom5566

https://www.codewars.com/kata/opposite-number/

題目

Very simple, given a number, find its opposite.

Examples:

1: -1
14: -14
-34: 34

But can you do it in 1 line of code and without any conditionals?

非常簡單,給你一個數字,找到這個數字的相反
但你能在一行程式中完成並不使用條件判斷?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions