20 lines
408 B
Python
20 lines
408 B
Python
|
# Programm, welches das Problem "48" bearbeitet
|
||
|
# also überprüft, ob der Nachfolger einer zahl
|
||
|
# und der Nachfolger der Hälfte der Zahl jeweils Quadratzahlen sind
|
||
|
|
||
|
def ist_Quadratzahl(n):
|
||
|
if (n**(1/2)== int(n**(1/2))):
|
||
|
return True
|
||
|
else:
|
||
|
return False
|
||
|
|
||
|
|
||
|
|
||
|
# Hier ist normales Programm
|
||
|
|
||
|
i=1
|
||
|
|
||
|
while True:
|
||
|
if ist_Quadratzahl(i+1) and ist_Quadratzahl(i/2+1):
|
||
|
print(i)
|
||
|
i+=1
|