Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
323 views
%time a= int(1938)^int(99484)
CPU time: 0.09 s, Wall time: 0.08 s
def legendre(a,p): for i in range(p): if a % p == i^2 % p: is_sqr_modp=3 else: is_sqr_modp=2 return is_sqr_modp
legendre(2,7)
2
b=range ︠ab674799-b8f0-4e1a-88c0-bfb94c086a44︠