Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Code Written by : John Nixon
- #Date: 11:10:2022 Time: 13:08:18
- #Copyrights are applicable
- import sys
- import os
- sys.setrecursionlimit(10000)
- try:
- sys.stdin = open('./input.txt', 'r')
- sys.stdout = open('./output.txt', 'w')
- except:
- pass
- profit = []
- selling = []
- total = 0
- for _ in range(int(input())):
- a,x,y = map(float,input().split())
- profit.append(a + (a * (x/100)))
- selling.append(profit[-1] - (profit[-1] * (y/100)))
- total += a
- ans = int(total - sum(selling))
- if ans > 0 :
- print("Loss",ans)
- else:
- print("Profit",abs(ans))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement