viratsardana10
BAN USER
Comments (3)
Reputation 0
Page:
1
Comment hidden because of low score. Click to expand.
0
of 0 vote
{{{t=raw_input()
t=int(t)
d={}
for i in range(2,t):
while t%i == 0:
d[i]=d.get(i,0)+1
t=t/i
if t>1:
d[t]=d.get(t,0)+1
print d
f=1
ans=1
for k in d:
if d[k]%2 !=0:
print 'not a square of any number'
f=0
break
else:
ans=ans*(k**(d[k]/2))
if f==1:
print 'square of some number'
print 'that number is',ans
-
viratsardana10
April 18, 2015 | Flag
Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote
t=raw_input()
t=int(t)
d={}
for i in range(2,t):
while t%i == 0:
d[i]=d.get(i,0)+1
t=t/i
if t>1:
d[t]=d.get(t,0)+1
print d
f=1
ans=1
for k in d:
if d[k]%2 !=0:
print 'not a square of any number'
f=0
break
else:
ans=ans*(k**(d[k]/2))
if f==1:
print 'square of some number'
print 'that number is',ans
Comment hidden because of low score. Click to expand.
0
of 0 vote
s=raw_input()
li=[]
d={}
for l in s:
if l not in li:
li.append(l)
d[l]=d.get(l,0)+1
for l in li:
if d[l]==1:
print l
break
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.