Թաքցված խնդիր
|Այս խնդիրը թաքցված է խմբագրական խրհրդի անդամի կողմից քանի որ կամ այն ոչ ճիշտ լեզվով է գրված,|կամ թեստային տվյալներն են սխալ, կամ խնդրի ձևակերպումը պարզ չէ։|

COCI0013 - PRSTENI

   After an exhausting morning, Mirko fell asleep. His brother Stanko, however, just awoke and, like his brother, is all about excitement. Stanko found N rings of varying radiuses in the garage. He arranged them on the floor so that each ring (except the first and last) touches the ones before and after it.

   He started turning the first ring and noticed that the other rings turned as well; some faster, some slower!

   Thrilled with his discovery, he decided to count how many times the other rings turn while the first ring turns once. He gave up after noticing that this number is not always an integer and not knowing what to do.

   Write a program that determines how many times each ring turns while the first turns once.

Input.

   The first line of input contains an integer N (3 ≤ N ≤ 100), the number of rings.

   The next line contains N integers between 1 and 1000, the radiuses of Stanko's rings, in the order they are laid out on the floor.    

Output.

   The output must contain N-1 lines. For every ring other than the first, in the order they are given in the input, output a fraction A/B, meaning that the respective ring turns A/B times while the first ring turns once.

   The fractions must be in reduced form (the numerator and denominator must not have a common divisor larger than 1).    

Sample tests.

N

stdin

stdout

1

3
8 4 2
2/1
4/1 

2

4
12 3 8 4
4/1
3/2
3/1 

Ավելացրեց.Հրանտ Հովհաննիսյան
Ամսաթիվ.2016-05-09
Ժամանակի սահմանափակումը.1s
Ծրագրի տեքստի սահմանափակումը.50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Լեզուներ.Բոլորը բացի ASM32 ASM64 GAWK CLPS CLOJURE D ERL FSHARP FORTRAN GOSU HASK ICON ICK JS-MONKEY NEM NIM OBJC-CLANG PICO PIKE PYPY PYPY3 PY_NBC RUST SCM guile CHICKEN SED TCL WHITESPACE
Աղբյուրը.COCI, Contest #4, 2006-2007

© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.