会监测输入类型么

P5705 【深基2.例7】数字反转

KoiC @ 2023-02-15 15:47:07

写法1就可以过,写法2一个没过

  1. 写法1
n = float(input())
m = list(str(n))
for i in range(len(m), 0, -1):
    print(m[i-1], end='')
  1. 写法2
n = input()

for i in range(len(n), 0, -1):
    print(n[i-1], end='')

|