Robinson Crusoe decides to explore his isle. On a sheet of paper he plans the following process.

His hut has coordinates `origin = [0, 0]`. From that origin he walks a given distance `d` on a line
that has a given angle `ang` with the x-axis. He gets to a point A.
(Angles are measured with respect to the x-axis) 

From that point A he walks the distance `d` multiplied by a constant `distmult` on a line that 
has the angle `ang` multiplied by a constant `angmult` and so on and on.

We have `d0 = d`, `ang0 = ang`; then `d1 = d * distmult`, `ang1 = ang * angmult` etc ...

Let us suppose he follows this process n times.
What are the coordinates `lastx, lasty` of the last point?

The function `crusoe` has parameters;
- n        : numbers of steps in the process
- d        : initial chosen distance
- ang      : initial chosen angle in degrees
- distmult : constant multiplier of the previous distance
- angmult  : constant multiplier of the previous angle

`crusoe(n, d, ang, distmult, angmult)` should return
`lastx, lasty` as an array or a tuple depending on the language.

### Example:
`crusoe(5, 0.2, 30, 1.02, 1.1)` ->

The successive `x` are : `0.0, 0.173205, 0.344294, 0.511991, 0.674744, 0.830674` (approximately)

The successive `y` are : `0.0, 0.1, 0.211106, 0.334292, 0.47052, 0.620695` (approximately)

and
```
lastx: 0.8306737544381833
lasty: 0.620694691344071
```
### A drawing:

![alternative text](https://i.imgur.com/SGHbb6Vl.png)

Successive points:

- x: `0.0, 0.9659..., 1.8319..., 2.3319..., 1.8319...`
- y: `0.0, 0.2588..., 0.7588..., 1.6248..., 2.4908...`

### Note
Please could you ask before translating: some translations are already written and published when/if the kata is approved.

Difficulty: EASY
Tags: Fundamentals

Starter code:
def crusoe(n, d, ang, dist_mult, ang_mult):
	

Solutions:
from math import cos, sin, radians

def crusoe(n, d, ang, dist_mult, ang_mult):
	(x, y, a) = (0, 0, radians(ang))
	for i in range(n):
		x += d * cos(a)
		y += d * sin(a)
		d *= dist_mult
		a *= ang_mult
	return (x, y)


from math import sin, cos, pi

def crusoe(n, d, ang, dis_tmult, ang_mult):
	x = 0
	y = 0
	for i in range(n):
		x += d * cos(ang / 180 * pi)
		y += d * sin(ang / 180 * pi)
		d = d * dis_tmult
		ang = ang * ang_mult
	return (x, y)


from numpy import sin, cos, pi

def crusoe(n, d, ang, dist_mult, ang_mult):
	return (sum((d * dist_mult ** i * cos(ang * ang_mult ** i / 180 * pi) for i in range(n))), sum((d * dist_mult ** i * sin(ang * ang_mult ** i / 180 * pi) for i in range(n))))


from math import cos, sin, pi

def crusoe(n, d, ang, dis_tmult, ang_mult):
	lastx = 0
	lasty = 0
	for i in range(n):
		lastx += d * cos(ang * ang_mult ** i * pi / 180) * dis_tmult ** i
		lasty += d * sin(ang * ang_mult ** i * pi / 180) * dis_tmult ** i
	return (lastx, lasty)


from math import cos, sin, pi

def crusoe(n, d, ang, dist_mult, ang_mult):

	def sim(center, scale, ang):
		resx = center[0] + scale * cos(ang * pi / 180.0)
		resy = center[1] + scale * sin(ang * pi / 180.0)
		return (resx, resy)
	center = (0.0, 0.0)
	for i in range(1, n + 1):
		center = sim(center, d, ang)
		d *= dist_mult
		ang *= ang_mult
	return center


from math import cos, sin, radians as rad

def crusoe(n, d, a, dd, da):
	x = y = 0
	for _ in range(n):
		x += d * cos(rad(a))
		y += d * sin(rad(a))
		(d, a) = (d * dd, a * da)
	return (x, y)


from math import cos, sin, radians

def crusoe(n, d, ang, dist_mult, ang_mult):
	(x, y, theta, r) = (0, 0, 1, 1)
	for i in range(n):
		theta = ang * ang_mult ** i
		r = d * dist_mult ** i
		x += r * cos(radians(theta))
		y += r * sin(radians(theta))
	return (x, y)