18 lines
346 B
Python
Executable File
18 lines
346 B
Python
Executable File
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
"""
|
|
Created on Sat Mar 28 09:14:39 2020
|
|
|
|
@author: suwako
|
|
"""
|
|
|
|
def genere(n):
|
|
u=[83 for _ in range(n)]
|
|
l=[83%2 for _ in range(n)]
|
|
for i in range(1,n):
|
|
u[i] = (16365*u[i-1]) % 65521
|
|
l[i] = u[i]%2
|
|
return l
|
|
|
|
def palindrome(s):
|
|
return s[:len(s)//2] == s[:len(s)//2:-1] |