Advertisement
Guest User

Untitled

a guest
Oct 24th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. #4
  2. N = int(input())
  3. A = [0]*55
  4. B =[0]*9
  5.  
  6. for i in range(N):
  7. S= int(input())
  8. A[S] = 1
  9.  
  10. for i in range(55):
  11. if A[i]==1:
  12. if i <=4:
  13. B[0]+=1
  14. elif i <=8:
  15. B[1]+=1
  16. elif i <=12:
  17. B[2]+=1
  18. elif i <=16:
  19. B[3]+=1
  20. elif i <=20:
  21. B[4]+=1
  22. elif i <=24:
  23. B[5]+=1
  24. elif i <=28:
  25. B[6]+=1
  26. elif i <=32:
  27. B[7]+=1
  28. elif i <=36:
  29. B[8]+=1
  30. elif i <=38:
  31. B[8]+=1
  32. elif i <=40:
  33. B[7]+=1
  34. elif i <=42:
  35. B[6]+=1
  36. elif i <=44:
  37. B[5]+=1
  38. elif i <=46:
  39. B[4]+=1
  40. elif i <=48:
  41. B[3]+=1
  42. elif i <=50:
  43. B[2]+=1
  44. elif i <=52:
  45. B[1]+=1
  46. elif i <=54:
  47. B[0]+=1
  48. c = 0
  49. q = 0
  50. for i in B:
  51. if i == 6:
  52. c+=1
  53. elif c >q:
  54. q=c
  55. c=0
  56. print (q)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement