Skip to content

Instantly share code, notes, and snippets.

@yaraxxx
Last active Feb 26, 2020
Embed
What would you like to do?
delivery Service
2
3
10
20
30
2
50
100
def cal(orders , total=0):
if(orders == 0):
return total
else:
time = int(input())
total += 2 * time
return cal(orders-1,total)
def main():
t = int(input())
for case in range(t):
Orders = int(input())
time = cal(Orders)
print(case+1,".",time)
if __name__=="__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment