fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int n;cin>>n;
  6. int r,d;
  7. int t=n;
  8. while(n>0)
  9. {
  10. r=n%10;
  11. d=d+r;
  12. n=n/10;
  13. }
  14.  
  15. int k=t/d;
  16.  
  17. if(k%2==0) cout<<"yes";
  18. else cout<<"no";
  19.  
  20.  
  21.  
  22. }
  23.  
  24.  
  25.  
  26.  
Success #stdin #stdout 0s 5328KB
stdin
19
stdout
no