문제 코드 #include #include using namespace std; int solution(int a, int d, vector included) { int answer = 0; int aa = a; int dd = d; for (int i = 0; i < included.size(); ++i) { if (included[i] == true) { answer += aa; } aa += d; } return answer; }
문제 코드 #include #include using namespace std; int solution(int number, int n, int m) { int answer = 0; answer = (number % n == 0 && number % m == 0) ? 1 : 0; return answer; }