9.12 算法
k=int(nums[-1]) sumc=1 print( len(nums)%k,k) if len(nums)%k==0: l=len(nums)//k for i in range(k): sumc*=int(nums[l*i:l*i+l]) print(sumc) elif len(nums)%k==1: cur=0 l = (len(nums)-1) // k s,e=0,l for j in range(k): while e <= len(nums): if s==l*j: e=e+1 sumc*=int(nums[s:e]) print(j, s, e, sumc) if s==l*j: s=s+l+1 else: s+=l e+=l cur=max(cur,sumc) s,e,sumc=0,l,1 print(cur) elif len(nums)%k==2: print("2fun") cur=0 l = (len(nums)+1) // k s,e=0,l for j in range(k): while e <= len(nums)+1: if s==l*j: e=e-1 sumc*=int(nums[s:e]) print(j, s, e, sumc) if s==l*j: s=s+l-1 else: s+=l e+=l cur=max(cur,sumc) s,e,sumc=0,l,1 print(cur)