AC题解
2025-04-22 16:11:36
发布于:广西
13阅读
0回复
0点赞
直接用函数也可以
#include <cmath>
#include <iostream>
using namespace std;
int main()
{
long long n, a[105] = {};
cin >> n;
for (int i = 1; i <= n; i++)
{
cin >> a[i];
}
for (int i = 1; i <= n; i++)
{
double d = a[i] / 10.0;
long long cnt = round(d);
long long l = cnt * 10;
cout << l << endl;
}
return 0;
}
这里空空如也
有帮助,赞一个