水两发去建模,晚饭吃跟没吃似的,吃完没感觉啊。

---------------------------分割线”水过。。。。。“-------------------------------

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 洪水!!!的更多相关文章

  1. POJ 3100:Root of the Problem

    Root of the Problem Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 12060   Accepted: 6 ...

  2. poj 1004:Financial Management(水题,求平均数)

    Financial Management Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 126087   Accepted: ...

  3. [POJ] #1004# Financial Management : 浮点数运算

    一. 题目 Financial Management Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 173910   Acc ...

  4. OpenJudge/Poj 1004 Financial Management

    1.链接地址: http://poj.org/problem?id=1004 http://bailian.openjudge.cn/practice/1004 2.题目: 总时间限制: 1000ms ...

  5. poj 1004 Financial Management

    求平均数,记得之前在杭电oj上做过一个求平均数的题目,结果因为题目是英文的,我就懵逼了 #include <stdio.h> int main() { ; double num; int ...

  6. [POJ 1004] Financial Management C++解题

    参考:https://www.cnblogs.com/BTMaster/p/3525008.html #include <iostream> #include <cstdio> ...

  7. Financial Management POJ - 1004

    Financial Management POJ - 1004 解题思路:水题. #include <iostream> #include <cstdio> #include ...

  8. POJ 1004:Financial Management

    Financial Management Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 165062   Accepted: ...

  9. poj 3100 (zoj 2818)||ZOJ 2829 ||ZOJ 1938 (poj 2249)

    水题三题: 1.给你B和N,求个整数A使得A^n最接近B 2. 输出第N个能被3或者5整除的数 3.给你整数n和k,让你求组合数c(n,k) 1.poj 3100 (zoj 2818) Root of ...

随机推荐

  1. 网上看到的一些IT资源

    A.网站模板+logo+服务器主机+发票生成 HTML5 UP:响应式的HTML5和CSS3网站模板. Bootswatch:免费的Bootstrap主题. Templated:收集了845个免费的C ...

  2. 【DRF认证】

    目录 认证组件的详细用法 本文详细讲述了DRF认证组件的原理以及用法. @ * 源码剖析** 上一篇博客讲解DRF版本的时候我们都知道了,在dispatch方法里执行了initial方法来初始化我们的 ...

  3. Linux网卡驱动框架及制作虚拟网卡

    1.概述 网卡驱动与硬件相关,主要负责收发网络的数据包,将上层协议传递下来的数据包以特定的媒介访问控制方式进行发送,并将接收到的数据包传递给上层协议. 网卡设备与字符设备,块设备不同,网络设备驱动程序 ...

  4. celery work logging 问题

    celery 的日志里只输出日志 不输入标准打印

  5. 解决 Visual Studio 2013、2015、2017 工具箱不显示ArcGIS 10.2 控件,及ArcGIS模板丢失问题

    1.重装ArcObject SDK for .NET Framework方法 (1)问题描述: 环境:WIN10 64bit.Visual Studio 2013.ArcGIS10.1.ArcGIS ...

  6. 在带(继承)TextView的控件中,在代码中动态更改TextView的文字颜色

    今天由于公司项目需求,须要实现一种类似tab的选项卡,当时直接想到的就是使用RadioGroup和RadioButton来实现. 这种方法全然没问题.可是在后来的开发过程中,却遇到了一些困扰非常久的小 ...

  7. javascript创建对象的方法--组合模式

    javascript创建对象的方法--组合模式 一.总结 0.作用:解决原型模式对象独有属性创建麻烦的问题 1.组合模式使用普遍:jquery就是用的组合模式,组合模式使用非常普遍 2.组合模式优点: ...

  8. @JSONField 注解说明

    转自:https://blog.csdn.net/suyimin2010/article/details/80617538 导入@JSONField 注解: import com.alibaba.fa ...

  9. Spark通过YARN提交任务不成功(包含YARN cluster和YARN client)

    无论用YARN cluster和YARN client来跑,均会出现如下问题. [spark@master spark-1.6.1-bin-hadoop2.6]$ jps 2049 NameNode ...

  10. BZOJ3282: Tree (LCT模板)

    Description 给定N个点以及每个点的权值,要你处理接下来的M个操作. 操作有4种.操作从0到3编号.点从1到N编号. 0:后接两个整数(x,y),代表询问从x到y的路径上的点的权值的xor和 ...