Informatique/MPSI/maths/Q

17 lines
289 B
Plaintext
Raw Normal View History

2020-01-09 08:10:47 +01:00
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Nov 29 19:54:04 2019
@author: suwako
"""
def f(n, k=14):
return ((n+k)/(n))**(1/2)
def test(n, k=14):
L=[]
for i in range(1, n+1):
a=f(i, k)
if a == int(a):
L.append(i)
return L