Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pe039

def number_of_solution(p):
    num = 0
    for a in range(1,p//3):
        if (p**2-2*p*a)%(2*p-2*a) == 0:
            num += 1
    return num

def main(n=1000):
    d = {p:number_of_solution(p) for p in range(2,n+1,2)}
    ans = max(d,key=d.get)
    return ans
Comment

PREVIOUS NEXT
Code Example
Python :: how to upload files and folders with pygithub 
Python :: how to get the access of python on cmd 
Python :: how to make a tuple 
Python :: python top label plot 
Python :: ascii value of pi symbol in python 
Python :: python random number generator 
Python :: repeat every entru n times 
Python :: how to count the appearance of number or string in a list python 
Python :: how to use django-filters with viewset 
Python :: striding in python 
Python :: pinyin to pinyin numbers python 
Python :: create schema dynamo revit 
Python :: boxplot python count of data 
Python :: how to start a working to run a particular queue 
Python :: pandas apply return dataframe 
Python :: [Solved] Pandas TypeError: no numeric data to plot 
Python :: python on_mouse_down/collidepoint 
Python :: pandas row printed horizontally 
Python :: Get timestamp with pyrhon 
Python :: Bar Plot Seaborn with No Error Bars 
Python :: using claudinary in django 
Python :: Matplotlib giving error "OverflowError: In draw_path: Exceeded cell block limit" 
Python :: pytorch starting 
Python :: get random consonant python 
Python :: wxpython mainloop 
Python :: candle stick with volume plotly 
Python :: flask_uploads.exceptions.UploadNotAllowed 
Python :: divide all the numbers of a list by one number python 
Python :: pafy python documentation 
Python :: terneray operator in python 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =