prithivMLmods/Coder-Stat huggingface dataset:
Problem p02878 (C++)

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

typedef long long ll;
const int maxn = 2e7 + 10, mod = 998244353;

inline int gi() {
  char c = getchar();
  while (c < '0' || c > '9')
    c = getchar();
  int sum = 0;
  while ('0' <= c && c <= '9')
    sum = sum * 10 + c - 48, c = getchar();
  return sum;
}

inline int add(int x, int y) { return x + y > mod ? x + y - mod : x + y; }
inline int sub(int x, int y) { return x < y ? x - y + mod : x - y; }
inline int fpow(int x, int k) {
  int res = 1;
  while (k) {
    if (k & 1)
      res = (ll)res * x % mod;
    k >>= 1;
    x = (ll)x * x % mod;
  }
  return res;
}

int n, a, b;
int fac[maxn], ifac[maxn];

inline int C(int m, int n) {
  if (m < 0 || m < n)
    return 0;
  return (ll)fac[m] * ifac[n] % mod * ifac[m - n] % mod;
}

inline int F(int x, int y) {
  if (y <= x - 1)
    return 0;
  return sub(C(x + y, x), C(x + y, x - 1));
}

int main() {
  n = gi();
  a = gi();
  b = gi();
  fac[0] = ifac[0] = ifac[1] = 1;
  for (int i = 1; i < maxn; ++i)
    fac[i] = (ll)fac[i - 1] * i % mod;
  ifac[maxn - 1] = fpow(fac[maxn - 1], mod - 2);
  for (int i = maxn - 2; ~i; --i)
    ifac[i] = (ll)ifac[i + 1] * (i + 1) % mod;

  if (!b)
    return puts("1"), 0;
  int ans = 0;
  for (int i = 0; i <= n - b; ++i) {
    int tmp = F(i, b - 1);
    if (i + b == n) {
      if (i == a)
        ans = add(ans, tmp);
    } else {
      int x = n - b - i - 1, y = a - i + 1;
      ans = (ans + (ll)tmp * C(x + y - 1, y - 1)) % mod;
    }
  }
  printf("%d\n", ans);

  return 0;
}


Fixed submission:
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
const int maxn = 2e7 + 10, mod = 998244353;

inline int gi() {
  char c = getchar();
  while (c < '0' || c > '9')
    c = getchar();
  int sum = 0;
  while ('0' <= c && c <= '9')
    sum = sum * 10 + c - 48, c = getchar();
  return sum;
}

inline int add(int x, int y) { return x + y > mod ? x + y - mod : x + y; }
inline int sub(int x, int y) { return x < y ? x - y + mod : x - y; }
inline int fpow(int x, int k) {
  int res = 1;
  while (k) {
    if (k & 1)
      res = (ll)res * x % mod;
    k >>= 1;
    x = (ll)x * x % mod;
  }
  return res;
}

int n, a, b;
int fac[maxn], ifac[maxn];

inline int C(int m, int n) {
  if (n < 0 || m < n)
    return 0;
  return (ll)fac[m] * ifac[n] % mod * ifac[m - n] % mod;
}

inline int F(int x, int y) {
  if (y <= x - 1)
    return 0;
  return sub(C(x + y, x), C(x + y, x - 1));
}

int main() {
  n = gi();
  a = gi();
  b = gi();
  fac[0] = ifac[0] = ifac[1] = 1;
  for (int i = 1; i < maxn; ++i)
    fac[i] = (ll)fac[i - 1] * i % mod;
  ifac[maxn - 1] = fpow(fac[maxn - 1], mod - 2);
  for (int i = maxn - 2; ~i; --i)
    ifac[i] = (ll)ifac[i + 1] * (i + 1) % mod;

  if (!b)
    return puts("1"), 0;
  int ans = 0;
  for (int i = 0; i <= n - b; ++i) {
    int tmp = F(i, b - 1);
    if (i + b == n) {
      if (i == a)
        ans = add(ans, tmp);
    } else {
      int x = n - b - i - 1, y = a - i + 1;
      ans = (ans + (ll)tmp * C(x + y - 1, y - 1)) % mod;
    }
  }
  printf("%d\n", ans);

  return 0;
}
Problem p02879 (C++)

Buggy submission (status: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  cin >> A >> B;
  if (0 < A && A < 10 && 0 < B && B < 10)
    cout << A * B << endl;
  else
    return -1;
}

Fixed submission:
#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  cin >> A >> B;
  if (0 < A && A < 10 && 0 < B && B < 10)
    cout << A * B << endl;
  else
    cout << -1 << endl;
}
Problem p02879 (C++)

Buggy submission (status: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define repA(a, i, n) for (int i = a; i < n; i++)
#define trav(a, x) for (auto &a : x)
#define fll(a) memset(a, 0, sizeof(a));
#define mp make_pair
#define pb push_back
#define all(x) x.begin(), x.end()
#define fst first
#define sec second
#define itr(it, x) for (auto it = x.begin(); it != x.end(); it++)
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef map<int, int> ma;
#define fastio                                                                 \
  ios_base::sync_with_stdio(false);                                            \
  cin.tie(NULL);
void fopen() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  freopen("error.txt", "w", stderr);
}
int main() {
  fastio;
  fopen();
  int n, m;
  cin >> n >> m;
  if (n / 10 == 0 && m / 10 == 0) {
    cout << n * m;
  } else {
    cout << -1;
  }
}


Fixed submission:
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define repA(a, i, n) for (int i = a; i < n; i++)
#define trav(a, x) for (auto &a : x)
#define fll(a) memset(a, 0, sizeof(a));
#define mp make_pair
#define pb push_back
#define all(x) x.begin(), x.end()
#define fst first
#define sec second
#define itr(it, x) for (auto it = x.begin(); it != x.end(); it++)
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef map<int, int> ma;
#define fastio                                                                 \
  ios_base::sync_with_stdio(false);                                            \
  cin.tie(NULL);
void fopen() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  freopen("error.txt", "w", stderr);
}
int main() {
  fastio;
  // fopen();
  int n, m;
  cin >> n >> m;
  if (n / 10 == 0 && m / 10 == 0) {
    cout << n * m;
  } else {
    cout << -1;
  }
}
Problem p02879 (C++)

Buggy submission (status: Runtime Error):
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)

using namespace std;

typedef long long ll;
typedef pair<int, int> P;
const int INF = 1000000;

signed main() {
  int a, b;
  cin >> a >> b;
  if (a < 1 || a > 9)
    return -1;
  if (b < 1 || b > 9)
    return -1;
  cout << (a * b) << endl;
}

Fixed submission:
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)

using namespace std;

typedef long long ll;
typedef pair<int, int> P;
const int INF = 1000000;

signed main() {
  int a, b;
  cin >> a >> b;
  if (a < 1 || a > 9) {
    cout << -1 << endl;
    return 0;
  }
  if (b < 1 || b > 9) {
    cout << -1 << endl;
    return 0;
  }
  cout << (a * b) << endl;
}
Problem p02879 (C++)

Buggy submission (status: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define eps 1e-9
#define maxp 400
#define mod 1000000007
#define sin(s) scanf("%lld", &s);
#define sout(s) printf("%lld\n", s);
#define in(s) cin >> s
#define in2(a, b) cin >> a >> b
#define in3(a, b, c) cin >> a >> b >> c
#define out(s) cout << s
#define outs(s, a) cout << s << a
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define gear_change ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define nfl(i, n) for (i = 0; i < n; i++)
#define sfl(i, s, e) for (i = s; i < e; i++)
#define ufl(i, n) for (i = n - 1; i >= 0; i--)
using namespace std;
void solve() {
  ll a, b;
  in2(a, b);
  if (a <= 9 && b <= 9)
    cout << a * b << "\n";
  else
    cout << "-1\n";
}
int main() {
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
// freopen("output.txt","w",stdout);
#endif
  gear_change;
  ll test = 1;
  // in(test);
  while (test--) {
    solve();
  }
  return 0;
}


Fixed submission:
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define eps 1e-9
#define maxp 400
#define mod 1000000007
#define sin(s) scanf("%lld", &s);
#define sout(s) printf("%lld\n", s);
#define in(s) cin >> s
#define in2(a, b) cin >> a >> b
#define in3(a, b, c) cin >> a >> b >> c
#define out(s) cout << s
#define outs(s, a) cout << s << a
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define gear_change ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define nfl(i, n) for (i = 0; i < n; i++)
#define sfl(i, s, e) for (i = s; i < e; i++)
#define ufl(i, n) for (i = n - 1; i >= 0; i--)
using namespace std;
void solve() {
  ll a, b;
  in2(a, b);
  if (a <= 9 && b <= 9)
    cout << a * b << "\n";
  else
    cout << "-1\n";
}
int main() {

  gear_change;
  ll test = 1;
  // in(test);
  while (test--) {
    solve();
  }
  return 0;
}
Problem p02879 (C++)

Buggy submission (status: Runtime Error):
// someshsingh22
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define loop(i, n) for (int i = 0; i < n; i++)
#define FAST                                                                   \
  ios_base::sync_with_stdio(false);                                            \
  cin.tie(NULL)
#define inp_int(n, arr)                                                        \
  int arr[n];                                                                  \
  loop(i, n) cin >> arr[i];
#define inp_ll(n, arr)                                                         \
  ll arr[n];                                                                   \
  loop(i, n) cin >> arr[i];
#define out_int(n, arr) loop(i, n) printf("%d ", arr[i]);
#define out_ll(n, arr)                                                         \
  loop(i, n) printf("%lld ", arr[i]);                                          \
  cout << endl;
#define all(c) c.begin(), c.end()
// Snippets : BFS, DFS, edger, ncr, chef, inverse, sieve, lis-d*, mat_d*, pow

typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

int main() {
  FAST;
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
  int a, b;
  cin >> a >> b;
  if (a > 0 && b > 0 && a < 10 && b < 10)
    cout << a * b;
  else
    cout << -1;

  return 0;
}


Fixed submission:
// someshsingh22
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define loop(i, n) for (int i = 0; i < n; i++)
#define FAST                                                                   \
  ios_base::sync_with_stdio(false);                                            \
  cin.tie(NULL)
#define inp_int(n, arr)                                                        \
  int arr[n];                                                                  \
  loop(i, n) cin >> arr[i];
#define inp_ll(n, arr)                                                         \
  ll arr[n];                                                                   \
  loop(i, n) cin >> arr[i];
#define out_int(n, arr) loop(i, n) printf("%d ", arr[i]);
#define out_ll(n, arr)                                                         \
  loop(i, n) printf("%lld ", arr[i]);                                          \
  cout << endl;
#define all(c) c.begin(), c.end()
// Snippets : BFS, DFS, edger, ncr, chef, inverse, sieve, lis-d*, mat_d*, pow

typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

int main() {
  int a, b;
  cin >> a >> b;
  if (a > 0 && b > 0 && a < 10 && b < 10)
    cout << a * b;
  else
    cout << -1;

  return 0;
}
Problem p02879 (C++)

Buggy submission (status: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
#define max1 1000005
#define sz1 100001
#define mod 1000000007
#define moda 421412341324321ll
#define inf 1e18
#define ll long long int
#define debug(x) cout << #x << " " << x << endl
typedef pair<ll, ll> pr;
#define rte                                                                    \
  cout << "Correct";                                                           \
  exit(0);
int intlog(double x) { return (int)(log(x) / log(2)); }
double max(double x, double y) {
  if (x >= y) {
    return x;
  } else {
    return y;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
  ll l, r;
  cin >> l >> r;
  if (l >= 1 && l <= 9) {
    if (r >= 1 && r <= 9) {
      cout << l * r;
      return 0;
    }
  }
  cout << -1 << endl;
}

Fixed submission:
#include <bits/stdc++.h>
using namespace std;
#define max1 1000005
#define sz1 100001
#define mod 1000000007
#define moda 421412341324321ll
#define inf 1e18
#define ll long long int
#define debug(x) cout << #x << " " << x << endl
typedef pair<ll, ll> pr;
#define rte                                                                    \
  cout << "Correct";                                                           \
  exit(0);
int intlog(double x) { return (int)(log(x) / log(2)); }
double max(double x, double y) {
  if (x >= y) {
    return x;
  } else {
    return y;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  /*#ifndef ONLINE_JUDGE
  freopen("input.txt","r",stdin);
  freopen("output.txt","w",stdout);
  #endif*/
  ll l, r;
  cin >> l >> r;
  if (l >= 1 && l <= 9) {
    if (r >= 1 && r <= 9) {
      cout << l * r;
      return 0;
    }
  }
  cout << -1 << endl;
}
Problem p02879 (Python)

Buggy submission (status: Runtime Error):
S = list(input())
if len(S) > 3:
    print(int(S[0]) * int(S[1]))
else:
    print(-1)


Fixed submission:
S = list(input())
if len(S) < 4:
    print(int(S[0]) * int(S[-1]))
else:
    print(-1)
Problem p02879 (C++)

Buggy submission (status: Runtime Error):
#include <iostream>

int main() {
  int a, b;
  std::cin >> a >> b;
  if (a > 9 || b > 9) {
    std::cout << -1 << std::endl;
  } else {
    std::cout << a * b << std::endl;
  }
  return -1;
}

Fixed submission:
#include <iostream>

int main() {
  int a, b;
  std::cin >> a >> b;
  if (a > 9 || b > 9) {
    std::cout << -1 << std::endl;
  } else {
    std::cout << a * b << std::endl;
  }
}
Problem p02879 (Python)

Buggy submission (status: Runtime Error):
a = int(input())
b = int(input())

if a >= 10 or b >= 10:
    print(-1)
else:
    print(a * b)


Fixed submission:
a, b = map(int, input().split())

if a >= 10 or b >= 10:
    print(-1)
else:
    print(a * b)
Problem p02879 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using P = pair<int, int>;

const int MOD = 1e9 + 7;
const int INF = 1 << 30;
const int MAX = 1e5;

int n;

template <class T> inline void xmin(T &a, T b) { a = (a < b) ? a : b; }
template <class T> inline void xmax(T &a, T b) { a = (a > b) ? a : b; }

int a, b;

void solve() {
  cin >> a >> b;
  if (a > 9 || b > 9) {
    cout << -1 << endl;
  } else {
    cout << a * b << endl;
  }
}

signed main() {
  while (1)
    solve();
}


Fixed submission:
#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using P = pair<int, int>;

const int MOD = 1e9 + 7;
const int INF = 1 << 30;
const int MAX = 1e5;

int n;

template <class T> inline void xmin(T &a, T b) { a = (a < b) ? a : b; }
template <class T> inline void xmax(T &a, T b) { a = (a > b) ? a : b; }

int a, b;

void solve() {
  cin >> a >> b;
  if (a > 9 || b > 9) {
    cout << -1 << endl;
  } else {
    cout << a * b << endl;
  }
}

signed main() {
  // while(1)
  solve();
}
Problem p02879 (C++)

Buggy submission (status: Runtime Error):
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#define int long long
using namespace std;

signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
#ifndef ONLINE_JUDGE
  freopen("INPUT.txt", "r", stdin);
  freopen("OUTPUT.txt", "w", stdout);
#endif

  clock_t clk;
  clk = clock();

  // --------------Code s0tarts
  // here---------------------------------------------------------------------

  int a, b;
  cin >> a >> b;
  if (a < 10 && b < 10) {
    cout << a * b;
  } else {
    cout << -1;
  }

  // -------------------------------------Code ends
  // here------------------------------------------------------

  clk = clock() - clk;
  cerr << fixed << setprecision(6) << "Time: " << ((double)clk) / CLOCKS_PER_SEC
       << "\n";
  return 0;
}

Fixed submission:
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#define int long long
using namespace std;

signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  // #ifndef ONLINE_JUDGE
  //  freopen ("INPUT.txt" , "r" , stdin);
  //  freopen ("OUTPUT.txt" , "w" , stdout);
  // #endif

  clock_t clk;
  clk = clock();

  // --------------Code s0tarts
  // here---------------------------------------------------------------------

  int a, b;
  cin >> a >> b;
  if (a < 10 && b < 10) {
    cout << a * b;
  } else {
    cout << -1;
  }

  // -------------------------------------Code ends
  // here------------------------------------------------------

  clk = clock() - clk;
  cerr << fixed << setprecision(6) << "Time: " << ((double)clk) / CLOCKS_PER_SEC
       << "\n";
  return 0;
}
Problem p02879 (C++)

Buggy submission (status: Runtime Error):
#include <iostream>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  if ((a > 9 || b > 9) || (a < 1 || b < 1))
    return -1;
  cout << a * b << endl;
  return 0;
}

Fixed submission:
#include <iostream>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  if (a > 9 || b > 9)
    cout << -1 << endl;
  else
    cout << a * b << endl;
  return 0;
}
Problem p02879 (C++)

Buggy submission (status: Runtime Error):
// Nihal Mittal - nihal_47
// Shine Like a Sun , Burn like a Sun

/**⠀⠀⠀⠀⠀⠀⣀⣤⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⣰⣿⣿⣿⣿⠿⠿⣿⣿⣿⣿⣿⣿⣿⣧⢀⠀⠀⠀⠀
⠀⠀⠀⣿⣿⣿⠋⠀⠀⠀⠀⠀⠙⠀⠙⣿⣿⣿⣷⢳⢀⠀⠀⠀
⠀⠀⣠⣿⣿⣿⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⢀
⠀⠀⣸⣿⣿⣿⠸⠀⠀⠀⠒⠒⠒⠐⠀⠀⢿⣿⣿⣿⣿⣿⠀⠀
⠀⣴⣿⣿⣿⡿⠀⠒⣋⣙⡒⢰⠀⠤⣖⠒⢾⣿⣿⣿⣿⣧⠀⠀
⢺⣿⣿⣿⣿⢀⠀⠀⠉⠉⠉⠸⠀⡇⠉⠉⠀⢿⣿⣿⣿⣄⠀⠀
⠀⠙⣿⣿⣧⢻⠀⠀⠀⠀⠀⠠⠀⠰⠀⠀⠀⣸⠸⣿⣿⠿⠰⠀
⠀⠀⠀⠹⣿⣿⣿⣷⠀⡠⠙⣲⣔⣅⢡⣰⣷⣿⣿⣿⣧⠀⠀⠀
⠀⠀⠀⣼⣿⣿⣿⣿⠀⡿⠭⠭⠭⠭⢿⠀⣿⢻⣿⣿⠃⠀⠀⠀
⠀⠀⠀⠙⠛⣿⢻⠹⣿⠐⠙⠛⠟⠉⢀⣴⡟⢿⣿⡏⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⡟⠀⠀⠻⣦⣤⣶⠾⠋⠀⠀⠁⡦⢄⢀⠀⠀⠀
⠀⠀⠀⠀⡠⠁⡇⠑⢄⠀⠀⠀⠀⠀⠀⠔⠀⠀⠁⠀⠀⠀⠉⠁
⠀⠔⠊⠁⠀⠀⣇⠀⠀⠀⠑⡤⠤⢎⠁⠀⠀⡘⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢢⠠⠀⡠⢆⠀⠀⡠⠙⢄⠀⡸⠀
**/
#include <bits/stdc++.h>
#define ll long long
#define l long
#define mk make_pair
#define pb push_back
#define in insert
#define se second
#define fi first
#define mod 1000000007
#define watch(x) cout << (#x) << " is " << (x) << "\n"
#define all(v) (v).begin(), (v).end()
#define fast                                                                   \
  ios_base::sync_with_stdio(false);                                            \
  cin.tie(NULL);                                                               \
  cout.tie(0);
#define pii pair<int, int>
#define maxn 100005
using namespace std;
signed main() {
  fast;
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
  int a, b;
  cin >> a >> b;
  if (a >= 1 && a <= 9 && b >= 1 && b <= 9)
    cout << a * b;
  else
    cout << "-1";
}

Fixed submission:
// Nihal Mittal - nihal_47
// Shine Like a Sun , Burn like a Sun

/**⠀⠀⠀⠀⠀⠀⣀⣤⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⣰⣿⣿⣿⣿⠿⠿⣿⣿⣿⣿⣿⣿⣿⣧⢀⠀⠀⠀⠀
⠀⠀⠀⣿⣿⣿⠋⠀⠀⠀⠀⠀⠙⠀⠙⣿⣿⣿⣷⢳⢀⠀⠀⠀
⠀⠀⣠⣿⣿⣿⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⢀
⠀⠀⣸⣿⣿⣿⠸⠀⠀⠀⠒⠒⠒⠐⠀⠀⢿⣿⣿⣿⣿⣿⠀⠀
⠀⣴⣿⣿⣿⡿⠀⠒⣋⣙⡒⢰⠀⠤⣖⠒⢾⣿⣿⣿⣿⣧⠀⠀
⢺⣿⣿⣿⣿⢀⠀⠀⠉⠉⠉⠸⠀⡇⠉⠉⠀⢿⣿⣿⣿⣄⠀⠀
⠀⠙⣿⣿⣧⢻⠀⠀⠀⠀⠀⠠⠀⠰⠀⠀⠀⣸⠸⣿⣿⠿⠰⠀
⠀⠀⠀⠹⣿⣿⣿⣷⠀⡠⠙⣲⣔⣅⢡⣰⣷⣿⣿⣿⣧⠀⠀⠀
⠀⠀⠀⣼⣿⣿⣿⣿⠀⡿⠭⠭⠭⠭⢿⠀⣿⢻⣿⣿⠃⠀⠀⠀
⠀⠀⠀⠙⠛⣿⢻⠹⣿⠐⠙⠛⠟⠉⢀⣴⡟⢿⣿⡏⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⡟⠀⠀⠻⣦⣤⣶⠾⠋⠀⠀⠁⡦⢄⢀⠀⠀⠀
⠀⠀⠀⠀⡠⠁⡇⠑⢄⠀⠀⠀⠀⠀⠀⠔⠀⠀⠁⠀⠀⠀⠉⠁
⠀⠔⠊⠁⠀⠀⣇⠀⠀⠀⠑⡤⠤⢎⠁⠀⠀⡘⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢢⠠⠀⡠⢆⠀⠀⡠⠙⢄⠀⡸⠀
**/
#include <bits/stdc++.h>
#define ll long long
#define l long
#define mk make_pair
#define pb push_back
#define in insert
#define se second
#define fi first
#define mod 1000000007
#define watch(x) cout << (#x) << " is " << (x) << "\n"
#define all(v) (v).begin(), (v).end()
#define fast                                                                   \
  ios_base::sync_with_stdio(false);                                            \
  cin.tie(NULL);                                                               \
  cout.tie(0);
#define pii pair<int, int>
#define maxn 100005
using namespace std;
signed main() {
  fast;

  int a, b;
  cin >> a >> b;
  if (a >= 1 && a <= 9 && b >= 1 && b <= 9)
    cout << a * b;
  else
    cout << "-1";
}
Problem p02879 (C++)

Buggy submission (status: Runtime Error):
/* Don't try to hack it :|

            _/﹋\_
            (҂`_´)
            <,︻╦╤─҉- - - - - - - - - - - - - - -
            _/﹋\_
*/

#include <bits/stdc++.h>
#define ll long long
#define all(v) v.begin(), v.end()
#define pb push_back
#define f first
#define s second
#define mp make_pair
#define tr(con) for (auto it = con.begin(); it != con.end(); it++)
#define INF 1e9 + 7 // 1 * 10^9+ 7
#define rep(i, l, r) for (ll i = l; i <= r; i++)
#define fo(i, n) for (ll i = 0; i < n; i++)
using namespace std;

int main() {
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ll a, b;
  cin >> a >> b;
  if (a < 10 && b < 10)
    cout << a * b;
  else
    cout << "-1";
  return 0;
}


Fixed submission:
/* Don't try to hack it :|

            _/﹋\_
            (҂`_´)
            <,︻╦╤─҉- - - - - - - - - - - - - - -
            _/﹋\_
*/

#include <bits/stdc++.h>
#define ll long long
#define all(v) v.begin(), v.end()
#define pb push_back
#define f first
#define s second
#define mp make_pair
#define tr(con) for (auto it = con.begin(); it != con.end(); it++)
#define INF 1e9 + 7 // 1 * 10^9+ 7
#define rep(i, l, r) for (ll i = l; i <= r; i++)
#define fo(i, n) for (ll i = 0; i < n; i++)
using namespace std;

int main() {

  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ll a, b;
  cin >> a >> b;
  if (a < 10 && b < 10)
    cout << a * b;
  else
    cout << "-1";
  return 0;
}
Problem p02879 (C++)

Buggy submission (status: Runtime Error):
#include <bits/stdc++.h>
#define int long long
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define all(v) v.begin(), v.end()
#define hell 1000000007
#define rep(i, a, b) for (int i = a; i < b; i++)
#define repd(i, a, b) for (int i = a; i >= b; i--)
using namespace std;
void solve() {
  int a, b;
  cin >> a >> b;
  if (max(a, b) >= 10) {
    cout << -1 << endl;
  } else {
    cout << a * b << endl;
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
  int tests = 1;
  // cin>>tests;
  while (tests--) {
    solve();
  }
  return 0;
}

Fixed submission:
#include <bits/stdc++.h>
#define int long long
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define all(v) v.begin(), v.end()
#define hell 1000000007
#define rep(i, a, b) for (int i = a; i < b; i++)
#define repd(i, a, b) for (int i = a; i >= b; i--)
using namespace std;
void solve() {
  int a, b;
  cin >> a >> b;
  if (max(a, b) >= 10) {
    cout << -1 << endl;
  } else {
    cout << a * b << endl;
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  // #ifndef ONLINE_JUDGE
  //     freopen("input.txt", "r", stdin);
  //     freopen("output.txt", "w", stdout);
  // #endif
  int tests = 1;
  // cin>>tests;
  while (tests--) {
    solve();
  }
  return 0;
}
Problem p02879 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <cstdio>
inline int in();
inline void wr(int);
int main(int argc, char **argv) {
#ifndef ONLINE_JUDGE
  freopen("A.in", "r", stdin);
  freopen("A.ans", "w", stdout);
#endif
  register int a = in(), b = in();
  if (a > 9 || b > 9) {
    wr(-1), putchar('\n');
    return 0;
  }
  wr(a * b), putchar('\n');
}
inline int in() {
  register char c = getchar();
  register int x = 0, f = 1;
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-')
      f = -1;
  for (; c >= '0' && c <= '9'; c = getchar())
    x = (x << 1) + (x << 3) + (c & 15);
  return x * f;
}
inline void wr(int x) {
  if (x < 0)
    putchar('-'), x = -x;
  if (x / 10)
    wr(x / 10);
  putchar(x % 10 + '0');
}


Fixed submission:
#include <cstdio>
inline int in();
inline void wr(int);
int main(int argc, char **argv) {
#ifndef ONLINE_JUDGE
//	freopen("A.in","r",stdin);
//	freopen("A.ans","w",stdout);
#endif
  register int a = in(), b = in();
  if (a > 9 || b > 9) {
    wr(-1), putchar('\n');
    return 0;
  }
  wr(a * b), putchar('\n');
}
inline int in() {
  register char c = getchar();
  register int x = 0, f = 1;
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-')
      f = -1;
  for (; c >= '0' && c <= '9'; c = getchar())
    x = (x << 1) + (x << 3) + (c & 15);
  return x * f;
}
inline void wr(int x) {
  if (x < 0)
    putchar('-'), x = -x;
  if (x / 10)
    wr(x / 10);
  putchar(x % 10 + '0');
}
Problem p02879 (C++)

Buggy submission (status: Runtime Error):
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <time.h>
#include <tr1/unordered_map>
#include <tr1/unordered_set>
#include <vector>
using namespace std;
using namespace tr1;
#define FOR(i, j, k) for (int i = j; i < k; i++)
#define FORD(i, j, k) for (int i = j; i >= k; i--)
#define ll long long int
// Make sure no overflow problems
#define pii pair<int, int>
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define x first
#define y second
#define VAR(i, n) __typeof(n) i = (n)
#define FOREACH(i, c) for (VAR(i, (c).begin()); i != (c).end(); i++)
#define FORDEACH(i, c) for (VAR(i, (c).rbegin()), i != (c).rend(); i++)
#define REP(i, n) FOR(i, 0, n)
#define ld long double
const int INF = 1000000009;
const long long INFLL = (ll)INF * (ll)INF;
const ld EPS = 10e-9;

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);

#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
  int A, B;
  cin >> A >> B;
  if (A > 9 || B > 9)
    cout << -1;
  else
    cout << A * B;
  return 0;
}


Fixed submission:
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <time.h>
#include <tr1/unordered_map>
#include <tr1/unordered_set>
#include <vector>
using namespace std;
using namespace tr1;
#define FOR(i, j, k) for (int i = j; i < k; i++)
#define FORD(i, j, k) for (int i = j; i >= k; i--)
#define ll long long int
// Make sure no overflow problems
#define pii pair<int, int>
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define x first
#define y second
#define VAR(i, n) __typeof(n) i = (n)
#define FOREACH(i, c) for (VAR(i, (c).begin()); i != (c).end(); i++)
#define FORDEACH(i, c) for (VAR(i, (c).rbegin()), i != (c).rend(); i++)
#define REP(i, n) FOR(i, 0, n)
#define ld long double
const int INF = 1000000009;
const long long INFLL = (ll)INF * (ll)INF;
const ld EPS = 10e-9;

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  /*
      #ifndef ONLINE_JUDGE
          freopen("input.txt", "r", stdin);
          freopen("output.txt", "w", stdout);
      #endif */
  int A, B;
  cin >> A >> B;
  if (A > 9 || B > 9)
    cout << -1;
  else
    cout << A * B;
  return 0;
}
Problem p02879 (C++)

Buggy submission (status: Runtime Error):
#include <stdio.h>
int main() {
  int A, B;
  scanf("%d %d", &A, &B);
  return (A < 10 && B < 10) ? A * B : -1;
}

Fixed submission:
#include <stdio.h>
int main() {
  int A, B;
  scanf("%d %d", &A, &B);
  printf("%d", (A < 10 && B < 10) ? A * B : -1);
  return 0;
}
Problem p02879 (C++)

Buggy submission (status: Runtime Error):
#include <iostream>

int main() {
  int a, b;
  std::cin >> a >> b;
  int ans;
  if (a > 9 || b > 9) {
    ans = -1;
  } else {
    ans = a * b;
  }
  std::cout << ans;
  return 1;
}

Fixed submission:
#include <iostream>

int main() {
  int a, b;
  std::cin >> a >> b;
  int ans;
  if (a > 9 || b > 9) {
    ans = -1;
  } else {
    ans = a * b;
  }
  std::cout << ans;
  return 0;
}
Problem p02879 (C++)

Buggy submission (status: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pii pair<int, int>
#define ld long double
const int mod = 1e9 + 7;

int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);

#ifndef ONLINE_JUDGE
  freopen("input.txt", "rt", stdin);
  freopen("output.txt", "wt", stdout);
#endif

  int a, b;
  cin >> a >> b;
  if (a >= 1 && a <= 9 && b <= 9 && b >= 1) {
    cout << a * b << "\n";
  }

  else {
    cout << -1;
  }
}


Fixed submission:
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pii pair<int, int>
#define ld long double
const int mod = 1e9 + 7;

int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);

  int a, b;
  cin >> a >> b;
  if (a >= 1 && a <= 9 && b <= 9 && b >= 1) {
    cout << a * b << "\n";
  }

  else {
    cout << -1;
  }
}
Problem p02880 (C++)

Buggy submission (status: Runtime Error):
#include <algorithm>
#include <iostream>
using namespace std;
int main(void) {
  int n, i;
  cin >> n;
  for (i = 0; i < 10; i++)
    if (n % i == 0 && n / i < 10)
      break;
  if (i == 10)
    cout << "No" << endl;
  else
    cout << "Yes" << endl;
  return 0;
}

Fixed submission:
#include <algorithm>
#include <iostream>
using namespace std;
int main(void) {
  int n, i;
  cin >> n;
  for (i = 1; i < 10; i++)
    if (n % i == 0 && n / i < 10)
      break;
  if (i == 10)
    cout << "No" << endl;
  else
    cout << "Yes" << endl;
  return 0;
}
Problem p02880 (C++)

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

int main() {
  int N;
  cin >> N;

  bool flag = false;

  for (int i = 0; i < 9; i++) {

    if (N % i == 0 && N / i <= 9) {

      flag = 1;
    }
  }
  if (flag) {

    cout << "Yes" << endl;

  } else {

    cout << "No" << endl;
  }
}


Fixed submission:
#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;

  bool flag = false;

  for (int i = 1; i <= 9; i++) {

    if (N % i == 0 && N / i <= 9) {

      flag = 1;
    }
  }
  if (flag) {

    cout << "Yes" << endl;

  } else {

    cout << "No" << endl;
  }
}
Problem p02880 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REP2(i, n) for (int i = 1; i <= (int)(n); i++)
#define FOR(i, m, n) for (int i = m; i n; i++)
#define SORT(x) sort(x.begin(), x.end())
#define REVE(x) reverse(x.begin(), x.end())
#define ALL(x) (x).begin(), (x).end()
#define SUM(x) accumulate(ALL(x));
struct initon {
  initon() {
    cin.tie(0);
    ios::sync_with_stdio(false);
  };
};

int k = 0, n = 0, m = 0, l = 0, a = 0, b = 0, c = 0, d = 0, e = 0, ans = 0,
    ans2 = 0, x = 0, y = 0;
string s, t, S;
signed main() {
  cin >> n;
  for (int i = 1; i <= 9; a++)
    for (int j = 1; j <= 9; b++) {
      if (i * j == n) {
        cout << "Yes";
        return 0;
      }
    }
  cout << "No";
  return 0;
}


Fixed submission:
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REP2(i, n) for (int i = 1; i <= (int)(n); i++)
#define FOR(i, m, n) for (int i = m; i n; i++)
#define SORT(x) sort(x.begin(), x.end())
#define REVE(x) reverse(x.begin(), x.end())
#define ALL(x) (x).begin(), (x).end()
#define SUM(x) accumulate(ALL(x));
struct initon {
  initon() {
    cin.tie(0);
    ios::sync_with_stdio(false);
  };
};

int k = 0, n = 0, m = 0, l = 0, a = 0, b = 0, c = 0, d = 0, e = 0, ans = 0,
    ans2 = 0, x = 0, y = 0;
string s, t, S;
signed main() {
  cin >> n;
  for (int i = 1; i <= 9; i++)
    for (int j = 1; j <= 9; j++) {
      if (i * j == n) {
        cout << "Yes";
        return 0;
      }
    }
  cout << "No";
  return 0;
}
Problem p02880 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <bits/stdc++.h>
using namespace std;

#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ANS(ans) cout << ans << endl
#define FLG(flg)                                                               \
  if (flg)                                                                     \
    cout << "Yes" << endl;                                                     \
  else                                                                         \
    cout << "No" << endl;
#define YES cout << "Yes" << endl;
#define NO cout << "No" << endl;
#define COUT(s) cout << s << endl;
#define AN                                                                     \
  vector<int> a(n);                                                            \
  for (int i = 0; i < n; i++)                                                  \
    cin >> a[i];
#define IN                                                                     \
  int n;                                                                       \
  cin >> n;
#define VI vector<int>
#define SS stringstream ss;
#define SOLVE cout << solve() << endl;

int main() {
  IN bool flg = false;
  REP(i, n) {
    for (int j = i; i * j <= n; j++) {
      if (i * j == n)
        flg = true;
    }
  }
  FLG(flg)
}

Fixed submission:
#include <bits/stdc++.h>
using namespace std;

#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ANS(ans) cout << ans << endl
#define FLG(flg)                                                               \
  if (flg)                                                                     \
    cout << "Yes" << endl;                                                     \
  else                                                                         \
    cout << "No" << endl;
#define YES cout << "Yes" << endl;
#define NO cout << "No" << endl;
#define COUT(s) cout << s << endl;
#define AN                                                                     \
  vector<int> a(n);                                                            \
  for (int i = 0; i < n; i++)                                                  \
    cin >> a[i];
#define IN                                                                     \
  int n;                                                                       \
  cin >> n;
#define VI vector<int>
#define SS stringstream ss;
#define SOLVE cout << solve() << endl;

int main() {
  IN bool flg = false;
  for (int i = 1; i <= 9; i++) {
    for (int j = i; j <= 9; j++) {
      if (i * j == n)
        flg = true;
    }
  }
  FLG(flg)
}
Problem p02880 (C++)

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

int main() {
  int N = 0;
  cin >> N;

  for (int i = 1; i <= 9; i++) {
    if ((N % i) == 0 && (N / i) < 10) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 1;
}


Fixed submission:
#include <bits/stdc++.h>
using namespace std;

int main() {
  int N = 0;
  cin >> N;

  for (int i = 1; i <= 9; i++) {
    if ((N % i) == 0 && (N / i) < 10) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
}
Problem p02880 (C++)

Buggy submission (status: Runtime Error):
#include <iostream>

int main() {
  int N = 0;
  std::cin >> N; // hold a number
  for (int i = 0; i < 10; ++i)
    if (N % i == 0 && N / i < 10) {
      std::cout << "Yes" << std::endl;
      return 0;
    }

  std::cout << "No" << std::endl;

  return 0;
}

Fixed submission:
#include <iostream>

int main() {
  int N = 0;
  std::cin >> N; // hold a number
  for (int i = 1; i < 10; ++i)
    if (N % i == 0 && N / i < 10) {
      std::cout << "Yes" << std::endl;
      return 0;
    }

  std::cout << "No" << std::endl;

  return 0;
}
Problem p02880 (C++)

Buggy submission (status: Runtime Error):
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#define int long long
using namespace std;

signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
#ifndef ONLINE_JUDGE
  freopen("INPUT.txt", "r", stdin);
  freopen("OUTPUT.txt", "w", stdout);
#endif

  clock_t clk;
  clk = clock();

  // --------------Code s0tarts
  // here---------------------------------------------------------------------

  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    if (n % i == 0) {
      if (n / i < 10 && i < 10) {
        cout << "Yes";
        return 0;
      }
    }
  }
  cout << "No";
  // -------------------------------------Code ends
  // here------------------------------------------------------

  clk = clock() - clk;
  cerr << fixed << setprecision(6) << "Time: " << ((double)clk) / CLOCKS_PER_SEC
       << "\n";
  return 0;
}

Fixed submission:
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#define int long long
using namespace std;

signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  // #ifndef ONLINE_JUDGE
  //    freopen ("INPUT.txt" , "r" , stdin);
  //    freopen ("OUTPUT.txt" , "w" , stdout);
  // #endif

  clock_t clk;
  clk = clock();

  // --------------Code s0tarts
  // here---------------------------------------------------------------------

  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    if (n % i == 0) {
      if (n / i < 10 && i < 10) {
        cout << "Yes";
        return 0;
      }
    }
  }
  cout << "No";
  // -------------------------------------Code ends
  // here------------------------------------------------------

  clk = clock() - clk;
  cerr << fixed << setprecision(6) << "Time: " << ((double)clk) / CLOCKS_PER_SEC
       << "\n";
  return 0;
}
Problem p02880 (C++)

Buggy submission (status: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
  int a;
  cin >> a;
  if (a > 81) {
    cout << "No" << endl;
    return 0;
  }

  int cnt = 0;
  rep(i, 9) {
    if (a % i == 0 && (0 <= a / i && a / i <= 9))
      cnt++;
  }

  if (cnt > 0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}

Fixed submission:
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
  int a;
  cin >> a;
  if (a > 81) {
    cout << "No" << endl;
    return 0;
  }

  int cnt = 0;
  rep(i, 9) {
    if (a % (i + 1) == 0 && (0 <= a / (i + 1) && a / (i + 1) <= 9))
      cnt++;
  }

  if (cnt > 0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
Problem p02880 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  bool ans = false;
  for (int i = 1; i < 10;) {
    for (int j = 1; j < 10; j++) {
      if (i * j == N)
        ans = true;
    }
  }

  if (ans)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}

Fixed submission:
#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  bool ans = false;
  for (int i = 1; i < 10; i++) {
    for (int j = 1; j < 10; j++) {
      if (i * j == N)
        ans = true;
    }
  }

  if (ans)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
Problem p02880 (C++)

Buggy submission (status: Runtime Error):
#include <iostream>
using namespace std;
int main() {
  int n, k = 9;

  cin >> n;

  for (k = 0; k >= 1; k--) {
    if (n % k == 0)
      break;
  }

  int c = n / k;

  if (c >= 10)
    cout << "No" << endl;
  else
    cout << "Yes" << endl;
}

Fixed submission:
#include <iostream>
using namespace std;
int main() {
  int n, k = 9;

  cin >> n;

  for (k = 9; k >= 1; k--) {
    if (n % k == 0)
      break;
  }

  int c = n / k;

  if (c >= 10)
    cout << "No" << endl;
  else
    cout << "Yes" << endl;
}
Problem p02880 (C++)

Buggy submission (status: Runtime Error):
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main() {
  int i, N, judge = 0;

  cin >> N;

  rep(i, 9) {
    if (N % i == 0 && N / i < 10) {
      judge = 1;
      break;
    }
  }

  if (judge)
    cout << "Yes";
  else
    cout << "No";
}


Fixed submission:
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main() {
  int i, N, judge = 0;

  cin >> N;

  rep(i, 9) {
    if (N % (i + 1) == 0 && N / (i + 1) < 10) {
      judge = 1;
      break;
    }
  }

  if (judge)
    cout << "Yes";
  else
    cout << "No";
}
Problem p02880 (C++)

Buggy submission (status: Runtime Error):
#include <iostream>

int main() {
  int n;
  std::cin >> n;
  bool ans = false;
  for (int i = 1; i < 10; ++i) {
    if (n % i == 0 && n / i < 10) {
      ans = true;
      break;
    }
  }
  if (ans) {
    std::cout << "Yes";
  } else {
    std::cout << "No";
  }
  return 1;
}

Fixed submission:
#include <iostream>

int main() {
  int n;
  std::cin >> n;
  bool ans = false;
  for (int i = 1; i < 10; ++i) {
    if (n % i == 0 && n / i < 10) {
      ans = true;
      break;
    }
  }
  if (ans) {
    std::cout << "Yes";
  } else {
    std::cout << "No";
  }
  return 0;
}
Problem p02880 (C++)

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

int main() {
  vector<int> P;
  int N;
  int M = 0;
  int count = 0;
  cin >> N;

  for (int i = 1; i <= 9; i++) {
    for (int j = 1; j <= 9; j++) {
      P.at(M) = i * j;
      M++;
    }
  }

  for (int i = 0; i < 81; i++) {
    if (N == P.at(i)) {
      cout << "Yes" << endl;
      break;
    }

    else
      count++;
  }
  if (count == 81)
    cout << "No" << endl;
}

Fixed submission:
#include <bits/stdc++.h>
using namespace std;

int main() {
  vector<int> P(81);
  int N;
  int M = 0;
  int count = 0;
  cin >> N;

  for (int i = 1; i <= 9; i++) {
    for (int j = 1; j <= 9; j++) {
      P.at(M) = i * j;
      M++;
    }
  }

  for (int i = 0; i < 81; i++) {
    if (N == P.at(i)) {
      cout << "Yes" << endl;
      break;
    }

    else
      count++;
  }
  if (count == 81)
    cout << "No" << endl;
}
Problem p02880 (C++)

Buggy submission (status: Runtime Error):
#include <iostream>

using namespace std;

int main() {
  int n;
  cin >> n;

  for (int i = 1; i < 10; i++) {
    if (n % i == 0) {
      if (n / i < 10) {
        cout << "Yes" << endl;
        return 0;
      }
    }
  }

  cout << "No" << endl;
  return 1;
}

Fixed submission:
#include <iostream>

using namespace std;

int main() {
  int n;
  cin >> n;

  for (int i = 1; i < 10; i++) {
    if (n % i == 0) {
      if (n / i < 10) {
        cout << "Yes" << endl;
        return 0;
      }
    }
  }

  cout << "No" << endl;
  return 0;
}
Problem p02880 (C++)

Buggy submission (status: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i < (int)(n); i++)

int main() {
  int n;
  cin >> n;

  rep(i, 10) {
    if (n % i == 0 && n / i < 10) {
      cout << "Yes";
      return 0;
    }
  }
  cout << "No";
  return 0;
}


Fixed submission:
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i < (int)(n); i++)

int main() {
  int n;
  cin >> n;

  rep1(i, 10) {
    if (n % i == 0 && n / i < 10) {
      cout << "Yes";
      return 0;
    }
  }
  cout << "No";
  return 0;
}
Problem p02880 (C++)

Buggy submission (status: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
#define int int64
#define rep(i, n) for (int i = 0; i < n; i++)
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define SORT(x) sort(x.begin(), x.end())
#define GSORT(x) sort(x.begin(), x.end(), greater<int>())
#define mk make_pair
#define fi first
#define se second
#define pb push_back
#define ALL(x) x.begin(), x.end()
#define V(T) vector<T>
typedef pair<int, int> P;
typedef pair<P, P> PP;
typedef vector<int> vi;
typedef vector<vi> vvi;
int max(int a, int b) {
  if (b > a)
    return b;
  else
    return a;
}
int min(int a, int b) {
  if (b < a)
    return b;
  else
    return a;
}

signed main() {
  int N;
  cin >> N;

  rep(i, 10) {
    if (N % i)
      continue;
    else if (N / i < 10) {
      cout << "Yes" << endl;
      return 0;
    }
  }

  cout << "No" << endl;

  return 0;
}

Fixed submission:
#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
#define int int64
#define rep(i, n) for (int i = 0; i < n; i++)
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define SORT(x) sort(x.begin(), x.end())
#define GSORT(x) sort(x.begin(), x.end(), greater<int>())
#define mk make_pair
#define fi first
#define se second
#define pb push_back
#define ALL(x) x.begin(), x.end()
#define V(T) vector<T>
typedef pair<int, int> P;
typedef pair<P, P> PP;
typedef vector<int> vi;
typedef vector<vi> vvi;
int max(int a, int b) {
  if (b > a)
    return b;
  else
    return a;
}
int min(int a, int b) {
  if (b < a)
    return b;
  else
    return a;
}

signed main() {
  int N;
  cin >> N;

  FOR(i, 1, 10) {
    if (N % i)
      continue;
    else if (N / i < 10) {
      cout << "Yes" << endl;
      return 0;
    }
  }

  cout << "No" << endl;

  return 0;
}
Problem p02880 (C++)

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

int main() {
  int N;
  cin >> N;
  bool flag = false;
  for (int i = 0; i < 10; i++) {
    if (N % i == 0 && N / i < 10) {
      flag = true;
    }
  }

  if (flag) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}

Fixed submission:
#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  bool flag = false;
  for (int i = 1; i < 10; i++) {
    if (N % i == 0 && N / i < 10) {
      flag = true;
    }
  }

  if (flag) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
Problem p02880 (C++)

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

int main() {
  int n;
  cin >> n;

  for (int i = 1; i < 10; i++) {
    for (int j = 1; j < 10; j++) {
      if (i * j == n) {
        cout << "Yes" << endl;
        exit(1);
      }
    }
  }
  cout << "No" << endl;
}

Fixed submission:
#include <bits/stdc++.h>
using namespace std;

int main() {
  int n;
  cin >> n;

  for (int i = 1; i < 10; i++) {
    for (int j = 1; j < 10; j++) {
      if (i * j == n) {
        cout << "Yes" << endl;
        return 0;
      }
    }
  }
  cout << "No" << endl;
}
Problem p02880 (C++)

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

int main() {
  int N;
  cin >> N;

  bool ans = false;
  for (int i = 0; i < 10; i++) {
    if (N % i == 0 && N / i < 10) {
      ans = true;
      break;
    }
  }

  if (ans == true) {
    cout << "Yes";
  } else {
    cout << "No";
  }
  return 0;
}

Fixed submission:
#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;

  bool ans = false;
  for (int i = 1; i < 10; i++) {
    if (N % i == 0 && N / i < 10) {
      ans = true;
      break;
    }
  }

  if (ans == true) {
    cout << "Yes";
  } else {
    cout << "No";
  }
  return 0;
}
Problem p02880 (C++)

Buggy submission (status: Runtime Error):
#include <iostream>
using namespace std;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i < 10; i++) {
    for (int j = 1; j < 10; j++) {
      if (i * j == n) {
        cout << "Yes";
        exit(1);
      }
    }
  }
  cout << "No";
}


Fixed submission:
#include <iostream>
using namespace std;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i < 10; i++) {
    for (int j = 1; j < 10; j++) {
      if (i * j == n) {
        cout << "Yes";
        exit(0);
      }
    }
  }
  cout << "No";
}
Problem p02880 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <iostream>

using namespace std;

int main(void) {
  int a, b;
  int c = 0;
  cin >> a;
  for (int i = 1; i < 10; ++i) {
    for (int ii = 1; i < 10; ++ii) {
      if (i * ii == a) {
        c = 1;
      }
    }
  }
  if (c == 1) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}

Fixed submission:
#include <iostream>

using namespace std;

int main(void) {
  int a, b;
  int c = 0;
  cin >> a;
  for (int i = 1; i < 10; i++) {
    for (int ii = 1; ii < 10; ii++) {
      if (i * ii == a) {
        c = 1;
      }
    }
  }
  if (c == 1) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}