delete pics to save space
This commit is contained in:
16
history_source/信息学奥赛一本通/1.3.3.cpp
Normal file
16
history_source/信息学奥赛一本通/1.3.3.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include<cstdio>
|
||||
using namespace std;
|
||||
double f(double x)
|
||||
{
|
||||
if(x>=0&&x<5) return -x+2.5;
|
||||
if(x>=5&&x<10) return 2-1.5*(x-3)*(x-3);
|
||||
if(x>=10&&x<20) return x/2.0-1.5;
|
||||
}
|
||||
int main()
|
||||
{
|
||||
double n;
|
||||
scanf("%lf",&n);
|
||||
printf("%lf\n",f(n));
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user