一道英文的外国C语言题目,看不懂说的什么意思,求指教!!
TetkaRapotackajustheardajuicyrumoraboutoneofherneighbors:poorJachymhaslostNkacky(thei...
Tetka Rapotacka just heard a juicy rumor about one of her neighbors: poor Jachym has lost N kacky (their local monetary unit) on a slot machine yesterday. Tetka Rapotacka now plans to share this rumor with everyone, including Tetka Klepetacka. Tetka Rapotacka has two favourite digits: digit1 and digit2. She only likes numbers that contain at least count1 occurrences of digit1 and at least count2 occurrences of digit2. When gossiping, she only uses numbers she likes. So if she does not like the number N, she will increase it until she finds a number that she likes. You are given the long N and the four ints digit1, count1, digit2, and count2. Return the smallest integer that is greater than or equal to N, contains at least count1 occurrences of digit digit1, and at least count2 occurrences of digit digit2.
展开
3个回答
展开全部
大概意思说 :Tetka Rapotacka喜欢2个数字,声明2个变量,digit1,digit2
但是有2条记录,可以看成是2个数组,他喜欢的2个数字就在这2个数组中,临时变量N将记录他喜欢的数字(共2条记录),但判断不是N的时候,将会N++,知道出现他喜欢的数字。返回值:return count1 是数组1的,return count2 是数组2的
范围在n大于或者小于N的最小整数
digit1至少是一个一位数,digit2是一个2位数
这是大体意思,前面那些讲2个人聊天什么的,没必要翻译
整个程序也挺简单
琢磨琢磨就能出来。
直接给出答案,会害了你!
但是有2条记录,可以看成是2个数组,他喜欢的2个数字就在这2个数组中,临时变量N将记录他喜欢的数字(共2条记录),但判断不是N的时候,将会N++,知道出现他喜欢的数字。返回值:return count1 是数组1的,return count2 是数组2的
范围在n大于或者小于N的最小整数
digit1至少是一个一位数,digit2是一个2位数
这是大体意思,前面那些讲2个人聊天什么的,没必要翻译
整个程序也挺简单
琢磨琢磨就能出来。
直接给出答案,会害了你!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询