HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Functions > problem:


035. 50467 - Random Numbers

Guest
• Review clarifications (1)

Volume problems

• 002. 50428 - Three Times
• 003. 50432 - Numbers and Squares
• 004. 50433 - Sum of Cubes
• 005. 50595 - Sum of the numbers
• 010. 50582 - Number of digits
• 016. 50459 - The Biggest Digit
• 020. 50575 - Number of Prime num...
• 030. 50576 - Number of Perfect nu...
• 035. 50467 - Random Numbers
• 040. 50354 - Intersecting Rectangles
• 050. 50510 - What floor are they?
• 050. 50566 - Grade Point Average (...
• 060. 50727 - Fibonacci Numbers
• 061. 50733 - The Highest Average
• 062. 50390 - Total Salary Paid
• 066. 50523 - Total Tax to Pay
• 070. 50534 - Top Trading Company

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question by Ibrahim Mesecan.

Write a program with a function that produces m random numbers between -n and +n. m and n are taken from the user. For example if n is 10 and m is 6 than the program might produce something like:
-2, 5, 10, 1, -10, 4,

Input specification
There will be two numbers (m and n) in the input where 0 ≤ m ≤ 10.000 and 1 ≤ n ≤ 1000.
Output specification
Show m random numbers which are between -n and +n.
Input Output 1
3 5
4 2 -3

Для отправки решений необходимо выполнить вход.

www.contester.ru