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

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

POJ 3100 Root of the Problem

http://poj.org/problem?id=3100

大意:

给定B和N,求一个数A使得A^N最接近B

太水了。。。。。

  1. #include<cstdio>
  2. #include<cmath>
  3. int main()
  4. {
  5. double B,N;
  6. while(scanf("%lf%lf",&B,&N),B||N)
  7. {
  8. double a1=floor(pow(B,1.0/N));
  9. double a2=a1+1;
  10.  
  11. if(fabs(pow(a1,N)-B )> fabs(pow (a2,N)-B))
  12. printf("%.0lf\n",a2);
  13. else
  14. printf("%.0lf\n",a1);
  15.  
  16. }
  17. }

1004 Financial Management

http://poj.org/problem?id=1004

大意:给定12个数,求他们平均值。。。。。。。。

  1. #include<cstdio>
  2. int main()
  3. {
  4. double temp,sum=0;
  5. for(int i=0;i<12;i++)
  6. {
  7. scanf("%lf",&temp);
  8. sum+=temp;
  9. }
  10. printf("$%.2lf\n",sum/12);
  11. }

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. 如何使用定时器settimeout、setInterval执行能传递参数的函数(转)

    来自: http://www.cnblogs.com/wkylin/archive/2012/09/07/2674911.html var userName="jack";//根据 ...

  2. BZOJ3994: [SDOI2015]约数个数和(莫比乌斯反演)

    Description  设d(x)为x的约数个数,给定N.M,求     Input 输入文件包含多组测试数据. 第一行,一个整数T,表示测试数据的组数. 接下来的T行,每行两个整数N.M. Out ...

  3. [Anuglar & NgRx] StoreRouterConnectingModule

    Always treat Router as the source of truth When we use Ngrx, we can see that we will use a "Sto ...

  4. [Javascript] Identify the most important words in a document using tf-idf in Natural

    Tf-idf, or term frequency-inverse document frequency, is a statistic that indicates how important a ...

  5. 开源 java CMS - FreeCMS2.3会员积分记录

    原文地址:http://javaz.cn/site/javaz/site_study/info/2015/28995.html​ 项目地址:http://www.freeteam.cn/ 积分记录 从 ...

  6. POJ--2516--Minimum Cost【最小费用最大流】

    链接:http://poj.org/problem?id=2516 题意:有k种货物,n个客户对每种货物有一定需求量,有m个仓库.每一个仓库里有一定数量的k种货物.然后k个n*m的矩阵,告诉从各个仓库 ...

  7. POJ3622 Gourmet Grazers(FHQ Treap)

    Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 2363   Accepted: 881 Description Like s ...

  8. 命令行SVN的使用

    1.检出svn  co  http://路径(目录或文件的全路径) [本地目录全路径]  --username 用户名 --password 密码svn  co  svn://路径(目录或文件的全路径 ...

  9. SQL创建数据库、表、存储过程及调用

    --如果存在数据库PRogrammerPay  就删除 if exists (select * from sysdatabases where name='programmerPay') drop d ...

  10. 几个经常使用的cmd命令

    compmgmt.msc 计算机管理  devmgmt.msc 设备管理器  diskmgmt.msc 磁盘管理工具  dfrg.msc 磁盘碎片整理  eventvwr.msc 事件查看器  fsm ...