问题描述:
a = int(input())
n = int(input())
b = "a*a"
b = eval(b)
result = []
print(b)
def get_digits(n):
if n > 0:
result.insert(0, n % 10)
get_digits(n // 10)
get_digits(b)
print(result)
c = list(reversed(result))
print(c)
print(c[n-1])
D:\python\venv\Scripts\python.exe D:/python/test1/第n位整数位.py
25
3
625
[6, 2, 5]
[5, 2, 6]
6
Process finished with exit code 0
整体截图