BPC 1 J2 - Cake

View as PDF

Submit solution


Points: 3
Time limit: 1.0s
Memory limit: 256M

Author:
Problem type

Balint is thinking about baking a cake. His recipe has N ingredients, each with a number of tablespoons required. Specifically, the recipe calls for a_i tablespoons of the i^\text{th} ingredient. He has decided to make a sample of his recipe. Output the amount of each ingredient he should use if he wants to bake the smallest cake possible, but he can only use whole tablespoons. The proportion of the ingredients in the sample should be the same as in the original recipe.

Constraints

1 \le N \le 100

1 \le a_i \le 10^4

Input Specification

The first line contains a single integer, N.

The next line contains N integers, a_i.

Output Specification

Output a single line containing N space-separated integers, the number of tablespoons he should use from each ingredient.

Sample Input

2
2 4

Sample Output

1 2

Explanation for Sample

He can use 1 tablespoon of the first ingredient and 2 tablespoons of the second ingredient.


Comments

There are no comments at the moment.