本题来自 Project Euler 第13题:https://projecteuler.net/problem=13 # Project Euler: Problem 13: Large sum # Work out the first ten digits of the sum of the following one-hundred 50-digit numbers. # Answer: 5537376230 numbers = '''371072875339021027987979982
想要截取字符串前几位与后几位,主要代码如下 截取字符串前几位 var disName ='开心一族漂亮家园'; var shortName = disName.substring(0,5); console.log(shortName);//打印结果:开心一族漂 截取字符串后几位 var disName ='开心一族漂亮家园'; var disLength = disName.length; var shortName = disName.substring(disLength-2,disLen