MCPcopy Create free account
hub / github.com/E869120/math-algorithm-book / main

Function main

codes/cpp/Code_2_04_2.cpp:4–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2using namespace std;
3
4int main() {
5 // ����
6 int N, X, Y;
7 cin >> N >> X >> Y;
8
9 // ���������߂�
10 int cnt = 0;
11 for (int i = 1; i <= N; i++) {
12 if (i % X == 0 || i % Y == 0) cnt++; // mod �̌v�Z�� 2.2 �ߎQ��
13 }
14
15 // �o��
16 cout << cnt << endl;
17 return 0;
18}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected