No tags yet

No tag edit access

В условии задачи недавно были сделаны правки. Просмотреть изменения.

×
time limit per test: 0.25 sec.

memory limit per test: 4096 KB

memory limit per test: 4096 KB

input: standard input

output: standard output

output: standard output

Extraordinary things are around us! All citizens of democratic Berland provided election of president and nobody voted "against all candidates". All votes distributed between N candidates. You was charged to write a program to calculate the results of election. You must indicate a part of votes given to each of the candidates. You must write integer numbers, concidering two conditions:

- Total sum of parts must be exactly 100%

- Every part is an integer number and it must be equal to real part, rounded up or down.

- Total sum of parts must be exactly 100%

- Every part is an integer number and it must be equal to real part, rounded up or down.

There is a natural number N (1<=N<=10000) written in the first line - amount of candidates. Second line contains sequence of non-negative integer numbers A1, A2,..., AN; Ai is amount of votes given to the i-th candidate (Ai<=10000). Numbers of sequence are separated by one or more spaces.

Write sequence of sought parts. Separate numbers by a space. If solution does not exist, write "No solution". If there are several solutions write any of them.

Input

2

10 10

10 10

Output

50 50

Author: | Michael R. Mirzayanov |

Resource: | Saratov Subregional School Team Contest, 2002 |

Date: | Spring, 2002 |

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Sep/29/2020 08:29:27 (f3).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|