Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. # 假设省份证号为:653-129-1987-0526-7513
  2. temp = 6*7 + 5*9 + 3*10 + 1*5 + 2*8 + 9*4 + 1*2 + 9*1 + 8*6 + 7*3 + 0*7 + 5*9 + 2*10 + 6*5 + 7*8 + 5*4 + 1*2
  3. print 'temp = ',temp
  4. y = temp % 11
  5. list1 = [1,0,'x',9,8,7,6,5,4,3,2]
  6. print 'last = ', list1[y]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement