Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. t=int(input()) #input test cases from user
  2. an=[] #list that contains results of all test cases
  3. while t>0:
  4. l=int(input()) #input from user on which operation to be applied
  5. ans=l//10 #variable that contains final answer for each test cases
  6. if ans!=0:
  7. l=l%10
  8. x=l//7
  9. if x!=0:
  10. l=l%7
  11. ans+=x
  12.  
  13. x=l//5
  14. if x!=0:
  15. l=l%5
  16. ans+=x
  17. x=l
  18. if x!=0:
  19. ans+=x
  20. t-=1
  21. an.append(ans)
  22. for k in an:
  23. print(k)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement