AC代码 | 考察数学函数
2024-12-20 13:53:46
发布于:广西
6阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int main()
{
    string s;
    double n;
    cin >> s >> n;
    if(s == "ceil")
    {
        printf("%.0lf",ceil(n));
    }
    if(s == "floor")
    {
        printf("%.0lf",floor(n));
    }
    if(s == "round")
    {
        printf("%.0lf",round(n));
    }
    return 0;
}
这里空空如也







有帮助,赞一个