Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. pesel = []
  2.  
  3. for x in range(1000):
  4.     pesel.append(str(input()))
  5.  
  6. print("Bledne:")
  7. for i in range(1000):
  8.     a1 = int(pesel[i][0])
  9.     a2 = int(pesel[i][1])
  10.     a3 = int(pesel[i][2])
  11.     a4 = int(pesel[i][3])
  12.     a5 = int(pesel[i][4])
  13.     a6 = int(pesel[i][5])
  14.     a7 = int(pesel[i][6])
  15.     a8 = int(pesel[i][7])
  16.     a9 = int(pesel[i][8])
  17.     a10 = int(pesel[i][9])
  18.     a11 = int(pesel[i][10])
  19.  
  20.     poprawnosc = 1*a1 + 3*a2 + 7*a3 + 9*a4 + 1*a5 + 3*a6 + 7*a7 + 9*a8 + 1*a9 + 3*a10 + a11
  21.  
  22.     if poprawnosc % 10 != 0:
  23.         print(pesel[i])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement