POJ 3100 Root of the Problem || 1004 Financial Management 洪水!!!
2013-11-16 18:26
435 查看
水两发去建模,晚饭吃跟没吃似的,吃完没感觉啊。
---------------------------分割线”水过。。。。。“-------------------------------
POJ 3100 Root of the Problem
http://poj.org/problem?id=3100
大意:
给定B和N,求一个数A使得A^N最接近B
太水了。。。。。
1004 Financial Management
http://poj.org/problem?id=1004
大意:给定12个数,求他们平均值。。。。。。。。
---------------------------分割线”水过。。。。。“-------------------------------
POJ 3100 Root of the Problem
http://poj.org/problem?id=3100
大意:
给定B和N,求一个数A使得A^N最接近B
太水了。。。。。
#include<cstdio> #include<cmath> int main() { double B,N; while(scanf("%lf%lf",&B,&N),B||N) { double a1=floor(pow(B,1.0/N)); double a2=a1+1; if(fabs(pow(a1,N)-B )> fabs(pow (a2,N)-B)) printf("%.0lf\n",a2); else printf("%.0lf\n",a1); } }
1004 Financial Management
http://poj.org/problem?id=1004
大意:给定12个数,求他们平均值。。。。。。。。
#include<cstdio> int main() { double temp,sum=0; for(int i=0;i<12;i++) { scanf("%lf",&temp); sum+=temp; } printf("$%.2lf\n",sum/12); }
相关文章推荐
- POJ 3100 Root of the Problem || 1004 Financial Management 洪水!!!
- POJ 3100 Root of the Problem(简单题)
- POJ-3100-Root of the Problem,原来是水题,暴力求解~~~
- poj 3100 && zoj 2818 ( Root of the Problem ) (睡前一水)
- poj 3100 Root of the Problem
- POJ 3100 Root of the Problem G++
- POJ 3100 Root of the Problem 可能会
- poj 3100 Root of the Problem
- zoj 2818 || poj 3100 Root of the Problem(水! = =)
- POJ 3100 & ZOJ 2818 & HDU 2740 Root of the Problem(数学)
- POJ_3100_Root of the Problem(暴力)
- POJ 3100 && HDU 2740 Root of the Problem(水~)
- a的n次幂 —— POJ 3100 Root of the Problem
- POJ 3100:Root of the Problem
- POJ 3100 & ZOJ 2818 & HDU 2740 Root of the Problem(数学)
- POJ 3100 Root of the Problem
- POJ 3100 Root of the Problem(我的水题之路——取A^N最接近B的A)
- POJ 3100 Root of the Problem (水题)
- Root of the Problem-3100
- POJ 2151--Check the difficulty of problem