fork download
  1. # your code goes here
  2. m=10**9+7
  3. p=pow(2,(m+1)//4,m)
  4. r=pow(3,(m+1)//4,m)
  5. print(p*p%m)
  6. print(r*r%m)
  7. rp=pow(p,m-2,m)
  8.  
  9. x = -(r+1)*rp%m
  10. y = (r-1)*rp%m
  11. print(x)
  12. print(y)
  13.  
  14. # 1 0 3 0
  15. # a
Success #stdin #stdout 0.12s 14096KB
stdin
Standard input is empty
stdout
2
3
50033160
9680440