本题来自 Project Euler 第8题:https://projecteuler.net/problem=8 # Project Euler: Problem 8: Largest product in a series # The four adjacent digits in the 1000-digit number # that have the greatest product are 9 × 9 × 8 × 9 = 5832. # Find the thirteen adjac
python中数字对象的创建如下, a = 123 b = 1.23 c = 1+1j 可以直接输入数字,然后赋值给变量. 同样也可是使用类的方式: a = int(123) b = float(1.23) c = complex(1+1j) 但一般不用类的方式创建,直接输入数字就好了. python中的数字包括了整型 int ,长整型 long , 浮点型 float , 复数 complex ,其差别为: int(整型) 也称有符号整数,只有正或负整数,不带小数点. 其和长整型在于整数有一定
Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible. Note: The length of num is less than 10002 and will be ≥ k. The given num does not contain any leading zero. Ex