#枚举和暴力
title:
链接:https://ac.nowcoder.com/acm/problem/15185
来源:牛客网
输入
2
5 196 1
3 60 4
输出
29089.0
1205.1322
题目分析:题目简单,直到极限是多少就会了。
#include<bits/stdc++.h>
using namespace std;
int main()
{
int T;
cin >> T;
while(T--)
{
double x=1;
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
cout << fixed << setprecision(c) << exp(a)*b << endl;
}
return 0;
}
有疑惑的就是将e 置为2.718281828459时,不能通过所有case,可能是精确的原因吧。
此次还是学习到了exp()的函数,顺带复习了 fixed 实数输出,setprecision()精确位数的使用。