ABC080B - Harshad Number
#include <iostream> using namespace std; int main(void) { int n, copy_n, sum = 0; cin.tie(0); ios::sync_with_stdio(false); cin >> n; copy_n = n; while (copy_n >= 1) { sum += copy_n % 10; copy_n /= 10; } cout << (n % sum == 0? "Yes" : "No") << "\n"; return 0; }