HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Ad-Hoc > problem:


50467 - Random Numbers

Guest
• Review clarifications (1)

Section problems

• 50396 - Cinema Tickets - 1
• 50366 - Student Averages (2 Grades)
• 50357 - Convert Euros into Dollars
• 50466 - Drawing Square From Stars
• 50351 - Convert inches to cm
• 50356 - Hours Passed
• 50350 - Fahrenheit to Celsius
• 50355 - Bills of City Water Company
• 50467 - Random Numbers
• 50298 - Coins
• 50591 - Leap year
• 50312 - Sales Bar Chart
• 50313 - Pattern Displays
• 50393 - Palindromic Numbers
• 50375 - Area of Circles
• 50325 - How much time passed?
• 50580 - Days passed

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