Riddle:

The probability that the square of a positive integer (in decimal notation) ends with the digit 1 is 2/10 because out of every 10 numbers those and only those ending with the digits 1 or 9 have squares ending with 1. What is the probability that the cube of a positive integer chosen at random ends with the digits 11?

Python Solution:

Riddle source: