# coding: utf-8
import numpy
class Solution:
def chuqinInfo(self, n, arrs):
res = []
for i in range(n):
arr = arrs[i]
count = 0
for s in arr:
if str(s) == 'absent':
count += 1
if count > 1:
res.append('False')
continue
for i in range(len(arr) - 1):
a = arr[i]
b = arr[i + 1]
if a in ('late', 'leaveearly') and b in ('late', 'leaveearly'):
res.append('False')
break
for i in range(len(arr)):
tmp = arr[i:1 + 7]
counts = 0
for ss in tmp:
if str(ss) == 'absent' or str(ss) == 'late' or str(ss) == 'leaveearly':
counts += 1
if counts > 3:
res.append('False')
else:
res.append('True')
return res
if __name__ == '__main__':
n = int(input("input n:"))
arrs = [0 for _ in range(n)]
for i in range(n):
arr = numpy.array(input('input arr:').split(' '))
arrs[i] = arr
solution = Solution()
print(solution.chuqinInfo(n, arrs))
文章目录 1. Nginx安装2. 安装cpolar3.配置域名访问Nginx4. 固定域名访问5. 配置静态站点 安装 Nginx(发音为“engine-x”)可以将您的树莓派变成一个强大的 Web 服务器,可以用于托管网站或 Web 应用程序。相比其他 Web 服务器,Ngi…