Commit d8ae7d58 by BellCodeEditor

save project

parent 2cffe2e4
Showing with 7 additions and 2 deletions
...@@ -2,5 +2,10 @@ with open(r'c:\Users\Administrator\Desktop\1.txt','r',encoding='utf-8') as file: ...@@ -2,5 +2,10 @@ with open(r'c:\Users\Administrator\Desktop\1.txt','r',encoding='utf-8') as file:
a=file.readlines() a=file.readlines()
for i in a: for i in a:
#print (i) #print (i)
b=i.split(' ') b=i.split()
print(b[1:]) #print(b[1:])
sum=0
for p in b[1:]:
sum+=int(p)
print(sum)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment