MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn moreOpportunities for recent engineering grads.

Apply TodayFind nearest prime number less than input number .

For example: if the input number is 125, then the nearest prime number which is less than this number is 113.

93 correct solutions
148 incorrect solutions

Last solution submitted on Jul 19, 2016

1 Comment

eggart
on 2 Mar 2016

IMHO 1 is not a prime, so that on input n=2 the correct answer should be [] and not 1.

1 Comment

Takehiko KOBORI
on 4 Oct 2015

これで正しいだろ。

2 Comments

bainhome
on 24 Aug 2014

you still not change the wrong test suite:4.1 is not a prime.

Gareth Lee
on 30 Apr 2015

agree with bainhome

5 Comments