ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1086. Криптография

<-- TLE? Look here! -->
Послано Diego 12 апр 2020 20:22
Hi everyone!

If you are getting TLE in Test #2 or maybe another, I would like to give you a little help:

-> Test #2 seems to give large numbers (like 15000), and it gives you those numbers in increasing order. Think about it.

Now, if that isn't enogh, I can give you a little more help:

-> Create an array / vector / list which will store the prime numbers you find.

-> Create an algorithm that determines whether a number is prime or not (remember to only       compare with odd numbers smaller than the square root of the number from which you are trying to figure out its primality).

-> Create a function that calculates the n-th prime number. For that create a counter which increases everytime you find a new prime number and store that prime number in your array / vector / list.

-> Finally, remember the thing I said at the beginning of this post! :D

Hope it helps. :D
Re: <-- TLE? Look here! -->
Послано feather 27 окт 2020 23:23
since it's recent enough, that gives some hope... honestly, i've done all of listed above, and yet it gives TLE. i'm so done with this... please help...