Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t=int(input()) #input test cases from user
- an=[] #list that contains results of all test cases
- while t>0:
- l=int(input()) #input from user on which operation to be applied
- ans=l//10 #variable that contains final answer for each test cases
- if ans!=0:
- l=l%10
- x=l//7
- if x!=0:
- l=l%7
- ans+=x
- x=l//5
- if x!=0:
- l=l%5
- ans+=x
- x=l
- if x!=0:
- ans+=x
- t-=1
- an.append(ans)
- for k in an:
- print(k)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement