That reminds me of this, more optimistically:
Matter and energy had ended and with it space and time. Even AC [Automated Computer] existed only for the sake of the one last question that it had never answered from the time a half-drunken computer technician ten trillion years before had asked the question of a computer that was to AC far less than was a man to Man.
All other questions had been answered, and until this last question was answered also, AC might not release his consciousness.
All collected data had come to a final end. Nothing was left to be collected.
But all collected data had yet to be completely correlated and put together in all possible relationships.
A timeless interval was spent in doing that.
And it came to pass that AC learned how to reverse the direction of entropy.
But there was now no man to whom AC might give the answer of the last question. No matter. The answer -- by demonstration -- would take care of that, too.
For another timeless interval, AC thought how best to do this. Carefully, AC organized the program.
The consciousness of AC encompassed all of what had once been a Universe and brooded over what was now Chaos. Step by step, it must be done.
And AC said, "LET THERE BE LIGHT!"
And there was light --
https://users.ece.cmu.edu/~gamvrosi/thelastq.html(Interesting, "The Last Question" was published in 1956, two years after "Answer." I wonder if Asimov was influenced by it.)
ETA:
ChatGPT says: Isaac Asimov acknowledged the influence of Fredric Brown's "Answer" in his book "Asimov on Science Fiction," where he wrote: "I was also much taken by Fredric Brown's 'Answer,' which appeared in Galaxy Science Fiction in the 1950s."
This is, as far as I can tell, an entirely invented quote. Fiat factum.