Quick actions

cmd+k|ctrl+k

Navigation

Languages

profit by total people

Snippet info

Language

Python

Visibility

public

Author

pheker

Created

2017-09-25T16:32:11Z

Updated

2017-09-25T16:32:11Z

import math

def calc(num):
    """
        50人(含)内3000一年,超出部分,每50人增加2千元(不足50人按50人计算)
这样的条件谁有JS计算的思路啊?主要是大于50之后的条件
    """
    sum = 3000
    if num > 50:
        sum = math.ceil(num / 50 -1) * 2000 + 3000
    return sum
        
        
print(calc(101))
INFO