19 
 
        
      
      我的馅饼被平分了吗?
      
  编写一个包含正整数的非空列表的程序或函数。您可能会假设它是以合理方便的格式输入的,例如"1 2 3 4"或[1, 2, 3, 4]。 输入列表中的数字表示完整饼图的切片,其中每个切片的大小与其对应的数字成比例,并且所有切片均按给定的顺序排列在图表周围。 例如,饼图为1 2 3 4: 您的代码必须回答的问题是:饼图是否一分为二?也就是说,从圆的一侧到另一侧是否存在一条完美的直线,将其对称地一分为二? 你需要输出truthy值,如果有至少一个平分线和输出falsy如果有没有价值。 在该1 2 3 4示例中,之间有一个等分线4 1,2 3因此输出将是真实的。 但是对于输入而言1 2 3 4 5,没有平分线,因此输出将是虚假的: 其他例子 以其他方式排列数字可能会消除等分线。 例如2 1 3 4→虚假: 如果输入列表中只有一个数字,则饼图不会一分为二。 例如10→虚假: 可能有多个平分线。只要大于零,输出就是真实的。 例如6 6 12 12 12 11 1 12→真实:(这里有3个等分线) 即使平分在视觉上不明显,也可能存在。 例如1000000 1000001→虚假: 例如1000000 1000001 1→真实: (感谢nces.ed.gov生成饼图。) 测试用例 …
      
        
          
                   43
                
        
        
          
                  
                    code-golf 
                  
                    math 
                  
                    arithmetic 
                  
                    combinatorics 
                  
                    decision-problem 
                  
                    code-golf 
                  
                    sequence 
                  
                    number-theory 
                  
                    binary 
                  
                    code-golf 
                  
                    number-theory 
                  
                    set-theory 
                  
                    code-golf 
                  
                    hashing 
                  
                    code-golf 
                  
                    game 
                  
                    card-games 
                  
                    code-golf 
                  
                    ascii-art 
                  
                    code-golf 
                  
                    arithmetic 
                  
                    array-manipulation 
                  
                    jelly 
                  
                    code-golf 
                  
                    string 
                  
                    array-manipulation 
                  
                    code-golf 
                  
                    sorting 
                  
                    code-challenge 
                  
                    code-golf 
                  
                    number 
                  
                    date 
                  
                    binary 
                  
                    code-golf 
                  
                    arithmetic 
                  
                    code-golf 
                  
                    math 
                  
                    number 
                  
                    linear-algebra 
                  
                    polynomials 
                  
                    code-golf 
                  
                    ascii-art 
                  
                    code-golf 
                  
                    grid 
                  
                    decision-problem 
                  
                    code-golf 
                  
                    string 
                  
                    combinatorics 
                  
                    code-golf 
                  
                    string 
                  
                    kolmogorov-complexity 
                  
                    arithmetic 
                  
                    date 
                  
                    code-golf 
                  
                    number 
                  
                    data-structures 
                  
                    code-golf 
                  
                    ascii-art 
                  
                    kolmogorov-complexity 
                  
                    code-golf 
                  
                    string 
                  
                    ascii-art 
                  
                    code-golf 
                  
                    ascii-art 
                  
                    kolmogorov-complexity 
                  
                    code-golf 
                  
                    array-manipulation