Skip to content

Instantly share code, notes, and snippets.

@yaraxxx
Last active February 26, 2020 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yaraxxx/3fcfca069e3ccace4328d1049cd1aaae to your computer and use it in GitHub Desktop.
Save yaraxxx/3fcfca069e3ccace4328d1049cd1aaae to your computer and use it in GitHub Desktop.
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