Ⅰ. 프로그래밍
[CodeUp] 1283 : 주식 투자
agencies
2024. 4. 6. 10:55
문제 접근 방법
- 백분률은 (입력한 값*0.01)*현재값을 해서 나온다.
- 이득 또는 손해 같은 경우 최종값에서 최초값을 뺀 결과로 구할 수 있다.
a=int(input())
m=a
b=int(input())
x = list(map(int,input().split()))
for i in range(b):
m+=m*x[i]*0.01
print("%.0f"%(m-a))
if a<m:
print("good")
elif a==m:
print("same")
else:
print("bad")