## POJ-1405(Heritage) 原

潘少online

Description

Your rich uncle died recently, and the heritage needs to be divided among your relatives and the church (your uncle insisted in his will that the church must get something). There are N relatives (N <= 18) that were mentioned in the will. They are sorted in descending order according to their importance (the first one is the most important). Since you are the computer scientist in the family, your relatives asked you to help them. They need help, because there are some blanks in the will left to be filled. Here is how the will looks:

Relative #1 will get 1 / ... of the whole heritage,
Relative #2 will get 1 / ... of the whole heritage,
---------------------- ...
Relative #n will get 1 / ... of the whole heritage.

The logical desire of the relatives is to fill the blanks in such way that the uncle's will is preserved (i.e the fractions are non-ascending and the church gets something) and the amount of heritage left for the church is minimized.

Input

The only line of input contains the single integer N (1 <= N <= 18).

Output

Output the numbers that the blanks need to be filled (on separate lines), so that the heritage left for the church is minimized.

Sample Input

``2``

Sample Output

``2 3``

# 我的答案：

``````import java.io.*;
import java.math.*;
import java.util.*;

class Main
{
public static void main(String[] args)
{
BigInteger temp = BigInteger.valueOf(2);;
BigInteger one = BigInteger.valueOf(1);
Scanner cin = new Scanner(new BufferedInputStream(System.in));
int n = cin.nextInt();
for(int i = 1;i < n;i++)
{
}
}
}``````

### 潘少online

html5刮奖区刮刮乐手机抽奖代码

2当家的
2017/03/16
478
0

2016/04/02
155
1

ACM的竞赛性强,因此自己应该和自己的实际应用联系起来.适合自己的才是好的,有的人不适合搞算法,喜欢系统架构,因此不要看到别人什么就眼红,发挥自己的长处,这才是重要的. 第一阶段：练经典常用...

long0404
2015/06/24
0
0
ZABBIX 2.0.8 RC1 发布，分布式监控系统

ZABBIX 2.0.8 RC1 主要是 bug 的修复，包括： :: List of Improvements included into 2.0.8rc1 [ZBXNEXT-1405] added IP to the warning about ignored messages because of their size [ZB......

oschina
2013/08/14
670
1
ZABBIX 2.0.8正式版发布，分布式系统监控

Zabbix发布2.0系列的正式版2.0.8.经过2个RC版。2013-08-21，之前的正式版2013-07-31的2.0.7.主要是修正了一些Bug。1.8系列还是1.8.17.开发版2.1.2。 完全改进： What's New in 2.0.8 :: Upd...

fei
2013/08/22
921
0

Spring Boot + Mybatis-Plus 集成与使用（二）

7
0

@[TOC](用最通俗的方法讲spring [一] ──── AOP) 写这个系列的目的(可以跳过不看) 自己写这个系列的目的,是因为自己是个比较笨的人,我曾一度怀疑自己的智商不适合干编程这个行业.因为在我...

7
0
Flutter系列之在 macOS 上安装和配置 Flutter 开发环境

6
0
OSChina 周六乱弹 —— 早上儿子问我他是怎么来的

Osc乱弹歌单（2019）请戳（这里） 【今日歌曲】 @凉小生 ：#今日歌曲推荐# 少点戾气，愿你和这个世界温柔以待。中岛美嘉的单曲《僕が死のうと思ったのは (曾经我也想过一了百了)》 《僕が死の...

2.5K
16
Excption与Error包结构，OOM 你遇到过哪些情况，SOF 你遇到过哪些情况

Throwable 是 Java 中所有错误与异常的超类，Throwable 包含两个子类，Error 与 Exception 。用于指示发生了异常情况。 Java 抛出的 Throwable 可以分成三种类型。 被检查异常（checked Exc...

Garphy

42
0