Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

Блог пользователя sasuke123

Автор sasuke123, 2 года назад, По-английски

So there's one more problem I cannot think any way of solving except brute force.

Question:

There's a array of strings, each string represents a number(length of string can be 10^5)

For each number represented as a string, we want to find whether it's of the form x^3 or x^3+4

(It's certain that number will be in either form)

The number are very large if the length of the string is 10^5 so we cannot use brute force or anything, any ideas?

Thank you

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

»
2 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Whether x ^ 3 + 4 or x ^ 3, the number is limited