Gold

5

1 votes
Hard
Problem

Input consists only of single integer, N.
You must print the answer obtained by given function,


int LittleFun(int N) :
  res = 1
  for i = 1, i ≤ N, ++i
    if gcd(i, N) = 1:
      res = (res * i) % N
  return res

That would be it.


Contraints:
1 ≤ N ≤ 1018

Time Limit: 2
Memory Limit: 256
Source Limit:
Editor Image

?