Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 149
1
def ISAttack (R):
2
R = ZZ(R)
3
n = R.ndigits()
4
#n = len(R)
5
for j in range(1, n + 1):
6
x=(R-(R % 10^j))/10^j
7
p = gcd(x, R)
8
if ((1 < p)and (p<R)):
9
return(p)
10
print "none found"
11
12