Submit solution
Points:
20
Time limit:
1.0s
Memory limit:
64M
Author:
Problem type
Allowed languages
Python
had a dream about a hard problem last night, and this morning he's decided to see if anyone can solve it.
x
, and stores it into a variable y
.
def foo():
x = <some secret value you do not know>
y = <some expression involving x you do not know>
def magic(n):
<does something with n>
magic(y)
<your submission code goes here>
Your task is simple: print y
!
As an added bonus, your solution should not use exec
or eval
, nor should it import
or open
files.
Comments
Do we print
y
after it's been (possibly) modified bymagic
or do we print its initial value?Yes. Yes. (Looks like it isn't mutated so it doesn't matter.)
Does this function
magic(n)
return anything or are there other tricks inmagic(n)
Yes, it returns something. All functions in Python return something, even if that something is
None
.Are x and y assumed to be numerical values?
Hint: it doesn't matter. Your task is to print it. Who cares what you are printing?
print
doesn't, so why should you?