a是b的倍數,即代表 a取餘數b為0
#include<iostream> using namespace std; int main() { int a, b; while( cin >> a >> b ) { if( a%b == 0 ) { cout << "Yes" << endl; } else { cout << "No" << endl; } } return 0; }