Medium
Last Digits of Squares
Read n and print, sorted, the set of last digits of the squares 1², 2², …, n², built with a set comprehension.
Input
One integer n ≥ 1.
Output
A sorted list.
Sample 1
Input
10
Output
[0, 1, 4, 5, 6, 9]
Sample 2
Input
1
Output
[1]
Output appears here