我收到此错误文件“Solution.py”,第 3 行,在 <module> o=int(input()) ValueError: invalid literal for int() with base 10: '3 1000'

时间:2021-05-14 20:02:50

标签: python

我收到此错误 ValueError: invalid literal for int() with base 10: '3 1000' 虽然我在 jupyternotebook 中得到了正确答案,但hackerrank 正在抛出此错误。

enter image description here

enter # Enter your code here. Read input from STDIN. Print output to STDOUT
nlst=[]
o=int(input())
nlst.append(o)
t=nlst[0]
nlst.append[10**t]
b=0
for x in range(nlst[0]):
     z=int(input())
     lname='list'+str(nlst[0])
     for y in range(z):
         lname=[]
         lname.append(int(input()))
    a= sorted(lname)
    b=b+a[-1]**2    
output=b%max1
print(output)code here`

0 个答案:

没有答案