要题解come here
2024-12-07 22:27:04
发布于:广东
4阅读
0回复
0点赞
求赞
请多多关照
题解如下:
#include<bits/stdc++.h>
using namespace std;
int main(){
double n;
cin >> n;
double ans;
if(n < 5) ans = 2.5 - n;
else if(n < 10) ans = 2 - 1.5 * (n - 3) * (n - 3);
else if(n < 20) ans = n / 2 - 1.5;
printf("%.3lf",ans);
return 0;
}
加油!
全部评论 1
包AC
2024-12-07 来自 广东
0
有帮助,赞一个