imesecan | Dec.15.2012 at 10:35:14 AM
|
0 | Сообщение скрыто
|
imesecan | Dec.15.2012 at 10:37:36 AM
|
1 | Сообщение скрыто
|
imesecan | Dec.15.2012 at 10:41:37 AM | |
2 | Yes
|
imesecan | Dec.15.2012 at 12:16:20 PM | |
3 | Yes I just saw that in input tests 100000 is included. That is the question has to say 1< a< b<= 100.000.
Thanks I will correct the question Can you please resubmit your solution.
|
imesecan | Dec.15.2012 at 02:57:12 PM
|
4 | Сообщение скрыто
|
imesecan | Dec.15.2012 at 05:24:05 PM
|
5 | Сообщение скрыто
|
imesecan | Dec.26.2012 at 02:15:52 PM | |
6 | Post is deleted
|
imesecan | Dec.26.2012 at 11:17:02 PM | |
7 | In order to check if a number is prime or not you need to check if the number is divisible by any number other than one and itself. That simply means you need to start checking if the number is divisible by: 2, 3, 4, ... (n-1). If any number divides perfectly than you can conclude that it's not prime otherwise it's prime.
But with a simple analysis you can understand that after (n/2) there is no number that can divide a number fully. That means checking 2, 3, 4, ... (n/2) will be enough.
But I told that to check if the number is prime, you don't have to check until (n-1) or (n/2); actually checking 2, 3, 4, ... sqrt(n) will be enough.
|
imesecan | Dec.27.2012 at 09:46:45 PM | |
8 | Post is deleted
|