简体   繁体   English

如何找到不能被 3 整除的最小 n 位数?

[英]How can I find the smallest number of n digits that is not divisible by 3?

As the input you get the number n.作为输入,您将获得数字 n。 You should output the smallest number of n digits which is not beginning or ending with zeros and will not be divisible by 3 in all of the number systems.您应该 output 不是以零开头或结尾的最小 n 位数,并且在所有数字系统中都不能被 3 整除。

My main problem is that I don't know, how can I find the numbers only from n digits, and without it all the tries are useless我的主要问题是我不知道,我怎样才能只从 n 位中找到数字,没有它所有的尝试都是无用的

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Python:找到一个数字的代码,其中前N个数字可被N整除(从0到9) - Python: Code to find a number where first N digits are divisible by N (from 0-9) 前 n 位可被 n 整除的 10 位数字 - 10 digit number whose first n digits are divisible by n 如何找到最小的N - How to find the smallest N 递归函数查找同时被三个数字整除的最小数字 - Recursive function to find the smallest number divisible by three numbers simultaneously 寻找能被 1 到 20 的所有数整除的最小数的程序 - Program to find the smallest number evenly divisible by all numbers from 1 to 20 查找下一个具有相同数字的最小数字 Python - FInd Next smallest number with same digits Python 查找由数字组成的 N 位数字的计数,总和等于 K。返回计数,最小和最大数字 - Find count of N-digits numbers which consist of digits give you the sum is equal to K. Return count, the smallest and the largest number 接受一个正的 integer n 作为输入,并找到打印最小的 integer 可以被范围 [1, n] 内的所有整数整除 - Accept a positive integer n as input and find the print the smallest integer that is divisible by all the integers in the range [1, n] 如何在不更改第一个列表顺序的情况下找到n个最小的数字? - How can I find n smallest numbers without changing the order of the first list? 如何找到最小的四位数字,其数字不重复,但加起来是一个随机数 - How to find the smallest four digit number, whose digits dont repeat, but add up to a randomized number
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM