1 条题解

  • 0
    @ 2026-6-14 15:00:18
    #include<bits/stdc++.h>
    using namespace std;
    int s(int x)
    {
    	int xx=x,res=0;
    	while(xx)res+=xx%10,xx/=10;
    	return res;
    }
    int main()
    {
    	int n;scanf("%d",&n);
    	puts(n%s(n)==0?"Yes":"No");
    	return 0;
    }
    
    • 1

    信息

    ID
    11564
    时间
    2000ms
    内存
    1024MiB
    难度
    3
    标签
    递交数
    34
    已通过
    21
    上传者