Идёт турнир! | В настоящий момент идёт турнир. Некоторая информация и функции сервера недоступны до его окончания.
|
|
imesecan | 15.дек.2012 в 10:35:14
| 0 | Сообщение скрыто
|
imesecan | 15.дек.2012 в 10:37:36
| 1 | Сообщение скрыто
|
imesecan | 15.дек.2012 в 10:41:37 | |
2 | Yes
|
imesecan | 15.дек.2012 в 12:16:20 | |
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 | 15.дек.2012 в 14:57:12
| 4 | Сообщение скрыто
|
imesecan | 15.дек.2012 в 17:24:05
| 5 | Сообщение скрыто
|
imesecan | 26.дек.2012 в 14:15:52 | |
6 | Реплика удалена
|
imesecan | 26.дек.2012 в 23:17:02 | |
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 | 27.дек.2012 в 21:46:45 | |
8 | Реплика удалена
|
|