Solution

163324

First name
Rayn
School
Abingdon
Country
Age
0

Some python code to add on to previously submitted solution:
def totient (x):
ans=1
list=[]
list2=[]
counter=0
while x != 1:
for i in range (2,x+1):
if x%i==0:
x=x//i
if i not in list:
list.append(i)
else:
if counter!=i:
list2.append(i)
counter=i
list2.append(i)
break
for i in list2:
while list.count(i)!=0:
list.remove(i)
for item in list:
ans=ans*(item-1)
while len(list2)!=0:
first=list2[0]
power=list2.count(first)
ans=ans*(first**power-first**(power-1))
while list2.count(first)!=0:
list2.remove(first)
return ans

a=int(input("input a number:"))
print(f'phi of {a} is {totient(a)}')