POJ 1507
#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的更多相关文章
- poj 2446 Chessboard (二分匹配)
Chessboard Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 12800 Accepted: 4000 Descr ...
- 【转载】图论 500题——主要为hdu/poj/zoj
转自——http://blog.csdn.net/qwe20060514/article/details/8112550 =============================以下是最小生成树+并 ...
- POJ 3370. Halloween treats 抽屉原理 / 鸽巢原理
Halloween treats Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7644 Accepted: 2798 ...
- POJ 2356. Find a multiple 抽屉原理 / 鸽巢原理
Find a multiple Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7192 Accepted: 3138 ...
- POJ 2965. The Pilots Brothers' refrigerator 枚举or爆搜or分治
The Pilots Brothers' refrigerator Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 22286 ...
- POJ 1753. Flip Game 枚举or爆搜+位压缩,或者高斯消元法
Flip Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 37427 Accepted: 16288 Descr ...
- POJ 3254. Corn Fields 状态压缩DP (入门级)
Corn Fields Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 9806 Accepted: 5185 Descr ...
- POJ 2739. Sum of Consecutive Prime Numbers
Sum of Consecutive Prime Numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 20050 ...
- POJ 2255. Tree Recovery
Tree Recovery Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11939 Accepted: 7493 De ...
随机推荐
- object sender ,EventArs e
引用:http://blog.csdn.net/kongbai308416350/article/details/4233786 说的通俗一些,就是: 有一个叫做EventHandler 的家伙,他会 ...
- Helloworld模块之内核makefile详解
Hello World 模块以及对应的内核makefile详解 hello.c: #include <linux/module.h> //所有模块都需要的头文件 #include < ...
- ios中怎么样自动剪切图片周围超出的部分
UIImageView *image = [[UIImageView alloc] init]; image.clipsToBounds = YES;
- Git操作指南(2) —— Git Gui for Windows的建库、克隆、上传
本教程将讲述:gitk的Git Gui的部分常用功能和使用方法,包括:建库.克隆(clone).上传(push).下载(pull - fetch).合并(pull - merge). ———————— ...
- Linux开机启动程序详解
Linux开机启动程序详解我们假设大家已经熟悉其它操作系统的引导过程,了解硬件的自检引导步骤,就只从Linux操作系统的引导加载程序(对个人电脑而言通常是LILO)开始,介绍Linux开机引导的步骤. ...
- 横屏下的ImagePickerController
Try this way.... As per Apple Document, ImagePicker Controller never Rotate in Landscape mode. You h ...
- LoadRunner - 当DiscuzNT遇上了Loadrunner(下) (转发)
当DiscuzNT遇上了Loadrunner(下) 在之前的两篇文章中,基本上介绍了如何录制脚本和生成并发用户,同时还对测试报告中的几个图表做了简单的说明.今天这篇文章做为这个系列的最后一篇,将会介绍 ...
- LC_ALL=C
设置LC_ALL=C,可以让sort按照字节排序;
- 自从用了Less 编写css,你比以前更快了~
之所以用这个标题呢,主要是最近调侃杰伦太有意思了. 好吧,开个玩笑而已. 如果你了解过Less,并对之很熟悉,就不用往下看了. 如果你没用过,恭喜,这是一个入门级的教程,学会了它,可以为你节省10%的 ...
- 我是一只it小小鸟阅读笔记
“我们具有各自的独特性--我们兴趣各异,有不同的家庭背景,不同的知识储备,不同的思维方式……但在现实中,我们也会碰到类似的人生选择的关口,我们会犯类似的错误,有类似的迷惘,也会为类似的精彩鼓掌,而且很 ...