Zhtluo's blog

By Zhtluo, history, 10 months ago, In English

Maybe next time we should not make ChatGPT-able problems or OEIS-able problems. :)

  • Vote: I like it
  • +364
  • Vote: I do not like it

»
10 months ago, # |
  Vote: I like it -102 Vote: I do not like it

Well well well...

why were you even testing ChatGPT... I hope you did this after the round not during

»
10 months ago, # |
  Vote: I like it +5 Vote: I do not like it

how does the chat gpt response translate into a solution for n = 99 tho

  • »
    »
    10 months ago, # ^ |
      Vote: I like it +119 Vote: I do not like it

    I mean you can append pairs of 0s at the end of the solution..

    • »
      »
      »
      10 months ago, # ^ |
        Vote: I like it +6 Vote: I do not like it

      oh LMAO

    • »
      »
      »
      10 months ago, # ^ |
        Vote: I like it +101 Vote: I do not like it

      LOL this is actually smarter than the intended sol

      • »
        »
        »
        »
        10 months ago, # ^ |
          Vote: I like it +5 Vote: I do not like it

        Wat What's the intended sol then?

        • »
          »
          »
          »
          »
          10 months ago, # ^ |
            Vote: I like it +8 Vote: I do not like it

          I assume that it's about playing with these patterns: 169 (1003, 1030 ...), 196 (1400), 961 (3001, 3010, ...) you can refer to my code.

      • »
        »
        »
        »
        10 months ago, # ^ |
          Vote: I like it +13 Vote: I do not like it

        doesnt the intended solution also need appending 0s to existing solutions?

        • »
          »
          »
          »
          »
          10 months ago, # ^ |
          Rev. 3   Vote: I like it 0 Vote: I do not like it

          yeah but thats only to make answer at least as much as the n — 2 one, but we now need to add 2 more which we do by 169 961, i guessed the pattern but if we put the same amount of 0s between 1, 6 and between 6, 9 it remains a perfect square, same for 961

          e.g: 169, 10609, 9006001

          EDIT : my bad i didnt see the above comments, i tried to do this exact thing with chatgpt too but it cant fucking do simple arithmetics, i guess paid version is better?

        • »
          »
          »
          »
          »
          10 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          I checked the editorial and they do have such a view, but I guess most people just perceived them as generating $$$n$$$ patterns.

»
10 months ago, # |
  Vote: I like it +3 Vote: I do not like it

as my know chatgpt is bad on math how could it find them

»
10 months ago, # |
  Vote: I like it +33 Vote: I do not like it

I mean, asking for chatgpt to find what you asked is almost the same effort as writing code to find what you asked. It was expected to do some kind of bruteforce, you just asked chatgpt to do it for you. I would only be concerned if it output that after printing the statement.

  • »
    »
    10 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    So true. I asked it to solve 3, 5, 7, 9, 11 and found that I can append 00 at the end..

    • »
      »
      »
      10 months ago, # ^ |
      Rev. 6   Vote: I like it +43 Vote: I do not like it

      Same but i coded it for small n (up to 9, then up to 11) and appended 00 at the end. Guess i should be asking chatgpt for this sort of simple bruteforces.

      edit: on second thought i would be scared of it spitting random bullshit at me so maybe not

      • »
        »
        »
        »
        10 months ago, # ^ |
          Vote: I like it +36 Vote: I do not like it

        Oh my god what happened how does this have 6 revisions

»
10 months ago, # |
  Vote: I like it +2 Vote: I do not like it

did you verify them?

  • »
    »
    10 months ago, # ^ |
      Vote: I like it +14 Vote: I do not like it

    Yes.

    • »
      »
      »
      10 months ago, # ^ |
      Rev. 2   Vote: I like it +81 Vote: I do not like it

      Assuming it's correct, do you suppose that the solution set is scraped off the internet somewhere? I would be very impressed if ChatGPT generated those numbers by itself (without access to a Python interpreter).

      • »
        »
        »
        »
        10 months ago, # ^ |
        Rev. 2   Vote: I like it +8 Vote: I do not like it

        At least the set seems to have all digits from $$$0$$$ to $$$9$$$, and I was able to find this Quora link related to this problem that could have been in the training data. However, it does not seem to have the set of numbers that the OP pointed out.

      • »
        »
        »
        »
        10 months ago, # ^ |
        Rev. 2   Vote: I like it +19 Vote: I do not like it

        The latest ChatGPT can run Python code online.

        So it technically generated some Python code and ran it.

        I checked and this is the code it ran:

        def find_large_solution_for_n(n, min_count):
            # Smallest and largest n-digit numbers
            smallest_n_digit = 10 ** (n - 1)
            largest_n_digit = (10 ** n) - 1
        
            # Square root range for generating n-digit squares
            lower_bound = math.ceil(math.sqrt(smallest_n_digit))
            upper_bound = math.floor(math.sqrt(largest_n_digit))
        
            # Dictionary to store squares by their digit multisets
            squares_by_multiset = {}
        
            # Generate all possible squares within the range and group them by digit multisets
            for i in range(lower_bound, upper_bound + 1):
                square = i ** 2
                if len(str(square)) == n:
                    # Create a multiset key (sorted tuple of digits)
                    multiset_key = tuple(sorted(str(square)))
        
                    # Add the square number to the appropriate list in the dictionary
                    if multiset_key in squares_by_multiset:
                        squares_by_multiset[multiset_key].append(square)
                    else:
                        squares_by_multiset[multiset_key] = [square]
        
                    # Return the first set found with at least min_count elements
                    if len(squares_by_multiset[multiset_key]) >= min_count:
                        return squares_by_multiset[multiset_key]
        
            return None
        
        # Find a solution for n = 11 with more than 99 square numbers
        large_solution_for_11 = find_large_solution_for_n(11, 100)
        large_solution_for_11
        
»
10 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Bro used chatGPT well rather than logic :|

»
10 months ago, # |
  Vote: I like it +22 Vote: I do not like it

Chat GPT wasn't necessary, you can do it with this simple code.

` map<string,vector<long long>> m;
  for (long long i=1;i<=300000;i++) {
    long long k=i*i;
    string s = to_string(k);
    sort(s.begin(),s.end());
    m[s].push_back(i);
  }
  for (auto u : m) {
    if (u.second.size()>=99) gg = u.first;
  }`
  • »
    »
    10 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    bro this is almost exactly the same code I used.

»
10 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Well, yes, it's bruteforceable with a brief formal statement, so it'd be surprising if it wasn't chatgptable.

»
10 months ago, # |
  Vote: I like it -15 Vote: I do not like it

Well, this isn't the full solution, you have to do more thing. The problem itself isn't ChatGPT able, I tried it.

»
10 months ago, # |
  Vote: I like it 0 Vote: I do not like it

LOL who needs chatgpt when you can a seperate script to generate squares.

»
10 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Can you share your prompt please? Zhtluo

  • »
    »
    10 months ago, # ^ |
      Vote: I like it +9 Vote: I do not like it
    • »
      »
      »
      10 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      So cool. About time I start respecting AI assisted CP. Btw, why did you feel that there would be 99+ numbers at 11 itself? It seems very non-obvious

      • »
        »
        »
        »
        10 months ago, # ^ |
          Vote: I like it +8 Vote: I do not like it

        I actually copied ChatGPT's code and messed around a bit offline. I saw some large sol for 9, 11, 13... which makes me conjure it. (Well technically I found the 99+ sol offline myself during the contest with GPT's code. This conversation is more like a test than what I did in contest.)