#3187. [POI2014] LAM-Solar lamps

[POI2014] LAM-Solar lamps

[POI2014] LAM-Solar lamps

题目描述

对于一个长度为n的数列p,数列中任意两个数互质。准备一个无限长的储存器。然后从p1开始,把储存器中p1倍数位置都赋值为p1,把储存器中p2倍数位置都赋值为p2,把储存器中p3倍数位置都赋值为p3。。。把储存器中pn倍数位置都赋值为pn。最后求每个pi在储存器中出现的比例,用分数表示。

输入格式

n n个两两互质的数。

输出格式

Your program should print out to the standard output a single line with nn integers t1,t2,,tnt_1,t_2,\cdots,t_n, separated by single spaces.

The number tit_i should be the time when the lamp no. ii starts producing light.

样例 #1

样例输入 #1

3
2
3
5

样例输出 #1

4/15
4/15
1/5

提示

1<=n<=1000,1<=pi<=10^9