Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n=int(input())
- p=input()
- f=p[0:3]
- C=p[4:-1]
- c=1
- if C:c=int(C)
- b=1
- for x in[0]*n:
- b=b*c
- if f=="sin":f="cos"
- else:
- f="sin"
- b=-b
- if b==1:b=""
- elif b==-1:b="-"
- else:b=str(b)
- print(b+f+" "+C+"x")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement