Problem p02693 (C++)

Buggy submission (status: Runtime Error):
#include <bits/stdc++.h>

#define int long long
#define fast_io()                                                              \
  ;                                                                            \
  ios_base::sync_with_stdio(0);                                                \
  cin.tie(0);                                                                  \
  cout.tie(0);
#define loop(i, a, b) for (int i = a; i < b; i++)
#define all(x) x.begin(), x.end()
#define us unordered_set
#define um unordered_map
#define ms multiset
#define mm multimap
#define pb push_back
#define pf push_front
#define ins insert
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define _max max_element
#define _min min_element
#define tc(T)                                                                  \
  int T;                                                                       \
  cin >> T;                                                                    \
  while (T--)
#define q(q)                                                                   \
  int q;                                                                       \
  cin >> q;                                                                    \
  while (q--)
#define pi 3.1415926535897932384626433832
const int pinf = ((int)9e18);
const int ninf = ((int)-9e18);
const int mod = 1000000007;

using namespace std;

int32_t main() {
  fast_io();

  // FILE *fptr1=freopen("in.txt","w",stdout);
  // FILE *fptr2=freopen("out.txt","w",stdout);

  int c, a, b;
  cin >> a >> b;

  loop(i, a, b + 1) {
    if (i % c == 0) {
      cout << "OK";
      return 0;
    }
  }

  cout << "NG";

  return 0;
}


Fixed submission:
#include <bits/stdc++.h>

#define int long long
#define fast_io()                                                              \
  ;                                                                            \
  ios_base::sync_with_stdio(0);                                                \
  cin.tie(0);                                                                  \
  cout.tie(0);
#define loop(i, a, b) for (int i = a; i < b; i++)
#define all(x) x.begin(), x.end()
#define us unordered_set
#define um unordered_map
#define ms multiset
#define mm multimap
#define pb push_back
#define pf push_front
#define ins insert
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define _max max_element
#define _min min_element
#define tc(T)                                                                  \
  int T;                                                                       \
  cin >> T;                                                                    \
  while (T--)
#define q(q)                                                                   \
  int q;                                                                       \
  cin >> q;                                                                    \
  while (q--)
#define pi 3.1415926535897932384626433832
const int pinf = ((int)9e18);
const int ninf = ((int)-9e18);
const int mod = 1000000007;

using namespace std;

int32_t main() {
  fast_io();

  // FILE *fptr1=freopen("in.txt","w",stdout);
  // FILE *fptr2=freopen("out.txt","w",stdout);

  int c, a, b;
  cin >> c >> a >> b;

  loop(i, a, b + 1) {
    if (i % c == 0) {
      cout << "OK";
      return 0;
    }
  }

  cout << "NG";

  return 0;
}