做网站切图尺寸,网页三剑客的网页制作软件是,网店活动策划方案,网站建立不安全1. 题意
给定一个整数#xff0c;判定这个数能整除多少个自己数位的个数。 统计能整除数字的位数
2. 题解
直接模拟即可
class Solution {
public:int countDigits(int num) {int tmp num;int ans 0;while ( tmp ) {int c tmp % 10;tmp / 10;if ( c (num % …1. 题意
给定一个整数判定这个数能整除多少个自己数位的个数。 统计能整除数字的位数
2. 题解
直接模拟即可
class Solution {
public:int countDigits(int num) {int tmp num;int ans 0;while ( tmp ) {int c tmp % 10;tmp / 10;if ( c (num % c 0))ans;}return ans;}
};