Complex graphs
In one of the math assignments your teacher asks you to plot the following function:
Knowing the software available online, you do it very quickly. Yet, your teacher asks you to write your own program that would print this graph.
For that, as a first step, you would need to know the value of the function at each possible
coordinate. ![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F14294b53-5cb7-459a-8542-7760fe26a24d%2FScreen_Shot_2022-04-20_at_6.54.00_PM.png?table=block&id=a3ee1911-d498-4e0d-bfd3-e9eb9619953f&cache=v2)
You decide to first write a program that given a single
coordinate, would print the value of the function.The input consists of two floating-point numbers
x
and y
. The program should print the value of the function written above.
Input | Output |
0
0 | 1 |
Hint
The
math
built-in library has cos
and sin
functions. You can use them to solve his problem.Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB