Responsive image

Problem 1329 --分段函数求值

1329: 分段函数求值

Time Limit: 1 Sec  Memory Limit: 30 MB
Submit: 1047  Solved: 707
[Submit][Status][Web Board][Creator:]

Description

已知:y是x的函数,
当x<-2时,y=7-2x;
当x>=-2,且x<3时,y=5-|3x+2|;
当x>=3时,y=3x+4

Input

任意输入一个整数x。

Output

输出为一个整数,即x对应的函数值。

Sample Input

2

Sample Output

-3

Source

 

[Submit][Status]
ACM算法攻关部
  • Anything about this OnlineJudge, Please Contact Administrator. Click add QQ

    OJ system based on HUSTOJ Project , UI based on Twitter Bootstrap

    Copyright 2016 ACM算法攻关部
    关于网站改版