Hide

# Problem AArrangement Room at Reykjavík University

One of the things that programming competition organizers have to do is decide which team should be in which room. There are $N$ rooms and $M$ teams. The rooms are similar in size, so it is best for teams to be divided into rooms as evenly as possible. For example, if there are $N = 3$ rooms and $M = 8$ teams, then it is best to put $3$ teams in one room, $3$ teams in another room, and then the last $2$ teams in the last room.

## Input

The input consists of two lines. On the first line is an integer $N$, and on the second line is an integer $M$.

## Output

The output should contain $N$ lines, one for each room. If $k$ teams are to be in room number $i$, then line $i$ should contain $k$ copies of the * symbol.

## Explanation of sample cases

The first sample is $N = 1$ rooms and $M = 5$ teams. Since there is only one room, all the teams are in that room.

The second sample is the same as the one taken above.

In the third sample, there are $N = 5$ lounges and $M = 33$ teams. Here it is best to put $6$ teams in two of the rooms, and $7$ teams in the other three rooms. Here we also see that order does not matter.

## Scoring

Your solution will be tested on different input data, which is divided into groups as shown in the table below. The solution will then receive points depending on which groups are solved.

 Group Points Input size Other conditions $1$ $20$ $N = 1$, $M \leq 500$ $2$ $20$ $N = 2$, $M \leq 500$ $3$ $30$ $N \leq 10$, $M \leq 500$ There will be the same number in each room. $4$ $30$ $N \leq 10$, $M \leq 500$
Sample Input 1 Sample Output 1
1
5

*****

Sample Input 2 Sample Output 2
3
8

***
***
**

Sample Input 3 Sample Output 3
5
33

*******
*******
******
*******
******

Sample Input 4 Sample Output 4
4
8

**
**
**
**
{"ft_lang_label":"__label__en","ft_lang_prob":0.9044308,"math_prob":0.9998708,"size":1815,"snap":"2023-14-2023-23","text_gpt3_token_len":557,"char_repetition_ratio":0.14688018,"word_repetition_ratio":0.036939315,"special_character_ratio":0.3570248,"punctuation_ratio":0.08943089,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99902034,"pos_list":[0,1,2],"im_url_duplicate_count":[null,3,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-03-27T03:49:42Z\",\"WARC-Record-ID\":\"<urn:uuid:1c36fc89-c833-4f72-bc3c-017d382b51a1>\",\"Content-Length\":\"36724\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:0ba8c9fa-900f-41dc-9dde-69c997d950f4>\",\"WARC-Concurrent-To\":\"<urn:uuid:0a1cd2e2-e48e-4e8a-97d9-4527a47feda8>\",\"WARC-IP-Address\":\"172.66.40.162\",\"WARC-Target-URI\":\"https://nus.kattis.com/courses/IT5003/IT5003_S1_AY2122/assignments/y8bk6j/problems/upprodun\",\"WARC-Payload-Digest\":\"sha1:UUPVOOEC4CRNMX3KRGLEJXKBRUTVNFMA\",\"WARC-Block-Digest\":\"sha1:QZIHMWWPH7D7RNC3M2MGALHH6LFDD6IA\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-14/CC-MAIN-2023-14_segments_1679296946637.95_warc_CC-MAIN-20230327025922-20230327055922-00420.warc.gz\"}"}