#include<iostream>
#include<stdio.h>
using namespace std;
#include<iomanip> double j(int n);
int main()
{
double sum = ;
cout<<"n e"<<endl;
cout<<"- -----------"<<endl;
for(int i = ; i <= ; i++)
{
sum += 1.0/j(i);
cout<<i;
if(i>=)
cout<<setiosflags(ios::fixed)<<setprecision()<<" "<<sum<<endl;
else
cout<<" "<<sum<<endl;
}
}
double j(int n)
{
double sum = ;
if(n == )
return ;
for(int i = ; i <= n ;i ++)
{
sum *= i;
}
return sum;
}

关注我的公众号,当然,如果你对Java, Scala, Python等技术经验,以及编程日记,感兴趣的话。

技术网站地址: vmfor.com

POJ 1507的更多相关文章

  1. poj 2446 Chessboard (二分匹配)

    Chessboard Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 12800   Accepted: 4000 Descr ...

  2. 【转载】图论 500题——主要为hdu/poj/zoj

    转自——http://blog.csdn.net/qwe20060514/article/details/8112550 =============================以下是最小生成树+并 ...

  3. POJ 3370. Halloween treats 抽屉原理 / 鸽巢原理

    Halloween treats Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 7644   Accepted: 2798 ...

  4. POJ 2356. Find a multiple 抽屉原理 / 鸽巢原理

    Find a multiple Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7192   Accepted: 3138   ...

  5. POJ 2965. The Pilots Brothers' refrigerator 枚举or爆搜or分治

    The Pilots Brothers' refrigerator Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 22286 ...

  6. POJ 1753. Flip Game 枚举or爆搜+位压缩,或者高斯消元法

    Flip Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 37427   Accepted: 16288 Descr ...

  7. POJ 3254. Corn Fields 状态压缩DP (入门级)

    Corn Fields Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 9806   Accepted: 5185 Descr ...

  8. POJ 2739. Sum of Consecutive Prime Numbers

    Sum of Consecutive Prime Numbers Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 20050 ...

  9. POJ 2255. Tree Recovery

    Tree Recovery Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 11939   Accepted: 7493 De ...

随机推荐

  1. 使用shell从DB2数据库导出数据

    使用shell脚本根据输入的用户名,数据库名,密码从DB2数据库导出数据 (1)a.sh脚本如下 #!/usr/bin/bash read -p "please input your DBN ...

  2. JavaScript高级程序设计之表单基础

    A FORM <form id='form' action='http://a-response-url' method="post"> <!--maxlengt ...

  3. IIS8 web.config 重定向之后 报错 500.19

    原因是没有安装 URL Rewrite 官方下载地址:http://www.iis.net/downloads/microsoft/url-rewrite#additionalDownloads

  4. EF6 在原有数据库中使用 CodeFirst 总复习(一、搭建基础环境)

    本来以为已经会了,可动手时发现许多问题还是模糊不清,正所谓眼高手低.只能重新查资料,再复习一遍. vs.net2013 ef6 mvc5 sqlserver2008   一.建立数据库  Bloggi ...

  5. mssql 动态添加数据库用户

    USE [master]GOCREATE LOGIN [admin] WITH PASSWORD=N'123456', DEFAULT_DATABASE=[test], CHECK_EXPIRATIO ...

  6. iOS 进阶 第十五天(0417)

    0417 创建UICollectionViewCell的Xib方法如下图 枚举定义导航跳转方式 js跳转到网页指定锚点 如下图所示:

  7. JAVA类与对象(四)----成员变量与局部变量 、成员方法、构造方法

    类体中的变量分为两部分.变量定义部分定义的变量为类的成员变量,在方法体中定义的变量和方法中涉及的变量称为局部变量. 成员变量和局部变量的区别: (1).成员变量在整个类中都有效,局部变量只在定义它的方 ...

  8. 基于PBOC电子钱包的圈存过程详解

    基于pboc的电子钱包的圈存过程,供智能卡行业的开发人员参考 一. 圈存 首先终端和卡片有一个共同的密钥叫做圈存密钥:LoadKey   (Load即圈存的意思,unLoad,是圈提的意思) 假设Lo ...

  9. Android -- 检测耳机插入状态

    原理                                                                                    其实android系统在耳机 ...

  10. boostrap中lg,md,sm,xs

    boostrap中lg,md,sm,xs分别表示多少px? .col-xs- 超小屏幕 手机 (<768px).col-sm- 小屏幕 平板 (≥768px).col-md- 中等屏幕 桌面显示 ...