> 英语 >
英语翻译
These positive integers:3748,67,869,32435465768 are all wiggle numbers because if you examine the digits of each number they go up,down,up,down,...or down,up,down,up,down,up,...For example:
3 < 7 > 4 < 8 and 3 > 2 < 4 > 3 < 5 > 4 < 6 > 5 < 7 > 6 < 8
A single digit is a wiggle number of length 1.
Write a program that will determine how many of the initial digits of a number form a wiggle number.The answer could,of course,be the length of the number in some cases.
人气:390 ℃ 时间:2020-09-29 20:29:06
解答
这些正整数:3748,67,869,32435465768全都是摆动数,因为如果你仔细看每个数的各个位,它们增大、减小、增大、减小...或减小、增大、减小、增大...例如:3 < 7 > 4 < 8 and 3 > 2 < 4 > 3 < 5 > 4 < 6 > 5 < 7 > 6 < 8...
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版