prithivMLmods/Coder-Stat huggingface dataset:
Problem p02692 (Python)

Buggy submission (status: Runtime Error):
N, A, B, C = map(int, input().split())
opts = []
for _ in range(N):
    opt = input()
    opts.append((ord(opt[0]) - ord("A"), ord(opt[1]) - ord("A")))

choices = []
nums = [A, B, C]
for i, opt in enumerate(opts):
    if nums[opt[0]] == 0 and nums[opt[1]] == 0:
        print("No")
        break
    if nums[opt[0]] == 1 and nums[opt[1]] == 1:
        if i < N - 1 and opt != opts[i + 1]:
            choice = next(set(opt) ^ set(opts[i + 1]))
            nums[opt] += 1
            nums[opt ^ opt[0] ^ opt[1]] -= 1
            choices.append(choice)
            continue
    if nums[opt[0]] >= nums[opt[1]]:
        choices.append(opt[1])
        nums[opt[1]] += 1
        nums[opt[0]] -= 1
    else:
        choices.append(opt[0])
        nums[opt[0]] += 1
        nums[opt[1]] -= 1
else:
    print("Yes")
    for c in choices:
        print(chr(c + ord("A")))


Fixed submission:
N, A, B, C = map(int, input().split())
opts = []
for _ in range(N):
    opt = input()
    opts.append((ord(opt[0]) - ord("A"), ord(opt[1]) - ord("A")))

choices = []
nums = [A, B, C]
for i, opt in enumerate(opts):
    if nums[opt[0]] == 0 and nums[opt[1]] == 0:
        print("No")
        break
    if nums[opt[0]] == 1 and nums[opt[1]] == 1:
        if i < N - 1 and opt != opts[i + 1]:
            choice = (set(opt) & set(opts[i + 1])).pop()
            nums[choice] += 1
            nums[choice ^ opt[0] ^ opt[1]] -= 1
            choices.append(choice)
            continue
    if nums[opt[0]] >= nums[opt[1]]:
        choices.append(opt[1])
        nums[opt[1]] += 1
        nums[opt[0]] -= 1
    else:
        choices.append(opt[0])
        nums[opt[0]] += 1
        nums[opt[1]] -= 1
else:
    print("Yes")
    for c in choices:
        print(chr(c + ord("A")))
Problem p02692 (C++)

Buggy submission (status: Runtime Error):
#include "bits/stdc++.h"
#define FI first.first
#define SE first.second
#define TH second
#define fi first
#define se second
#define th second

using namespace std;

void debug_out() { cerr << endl; }

template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}

#ifdef DEBUG
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

class DebugStream {
} LOG;
template <typename T> DebugStream &operator<<(DebugStream &s, const T &) {
  return s;
}
#ifdef DEBUG
#define LOG clog
#endif

typedef long long ll;
typedef pair<ll, ll> ii;
typedef long double ld;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());

const int maxN = 1e5 + 9, maxV = 1e6 + 9, MOD = 1e9 + 7, SQ = 335, lg = 20,
          bs = 29;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
#ifdef DEBUG
  freopen("input.txt", "r", stdin);
#endif

  int n;
  cin >> n;
  map<char, int> mp;
  cin >> mp['A'] >> mp['B'] >> mp['C'];

  vector<string> vc(n);
  for (auto &el : vc)
    cin >> el;

  for (int i = 0; i < n; i++) {
    char &p = vc[i][0], &q = vc[i][1];
    if (mp[p] > mp[q] ||
        (mp[p] == mp[q] && (i == n || vc[i + 1].find(q) != string::npos)))
      swap(p, q);
    mp[p]++, mp[q]--;
    if (mp[q] < 0) {
      cout << "No\n";
      return 0;
    }
  }

  cout << "Yes\n";
  for (auto el : vc)
    cout << el[0] << '\n';
}


Fixed submission:
#include "bits/stdc++.h"
#define FI first.first
#define SE first.second
#define TH second
#define fi first
#define se second
#define th second

using namespace std;

void debug_out() { cerr << endl; }

template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}

#ifdef DEBUG
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

class DebugStream {
} LOG;
template <typename T> DebugStream &operator<<(DebugStream &s, const T &) {
  return s;
}
#ifdef DEBUG
#define LOG clog
#endif

typedef long long ll;
typedef pair<ll, ll> ii;
typedef long double ld;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());

const int maxN = 1e5 + 9, maxV = 1e6 + 9, MOD = 1e9 + 7, SQ = 335, lg = 20,
          bs = 29;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
#ifdef DEBUG
  freopen("input.txt", "r", stdin);
#endif

  int n;
  cin >> n;
  map<char, int> mp;
  cin >> mp['A'] >> mp['B'] >> mp['C'];

  vector<string> vc(n);
  for (auto &el : vc)
    cin >> el;

  for (int i = 0; i < n; i++) {
    char &p = vc[i][0], &q = vc[i][1];
    if (mp[p] > mp[q] ||
        (mp[p] == mp[q] && (i + 1 == n || vc[i + 1].find(q) != string::npos)))
      swap(p, q);
    mp[p]++, mp[q]--;
    if (mp[q] < 0) {
      cout << "No\n";
      return 0;
    }
  }

  cout << "Yes\n";
  for (auto el : vc)
    cout << el[0] << '\n';
}
Problem p02692 (Python)

Buggy submission (status: Runtime Error):
n, a, b, c = (int(x) for x in input().split())
d = {"A": a, "B": b, "C": c}
S = [input() for _ in range(n)]
ANS = []

for i, s in enumerate(S):
    if d[s[0]] == 0 and d[s[1]] == 0:
        print("No")
        exit()
    else:
        if d[s[0]] > d[s[1]] or (
            d[s[0]] == d[s[1]] == 1 and i < n and s[1] in S[i + 1]
        ):
            d[s[1]] += 1
            d[s[0]] -= 1
            ANS.append(s[1])
        else:
            d[s[0]] += 1
            d[s[1]] -= 1
            ANS.append(s[0])
print("Yes")
for ans in ANS:
    print(ans)


Fixed submission:
n, a, b, c = (int(x) for x in input().split())
d = {"A": a, "B": b, "C": c}
S = [input() for _ in range(n)]
ANS = []

for i, s in enumerate(S):
    if d[s[0]] == 0 and d[s[1]] == 0:
        print("No")
        exit()
    else:
        if d[s[0]] > d[s[1]] or (
            d[s[0]] == d[s[1]] == 1 and i < n - 1 and s[1] in S[i + 1]
        ):
            d[s[1]] += 1
            d[s[0]] -= 1
            ANS.append(s[1])
        else:
            d[s[0]] += 1
            d[s[1]] -= 1
            ANS.append(s[0])
print("Yes")
for ans in ANS:
    print(ans)
Problem p02693 (C++)

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

#define IOS                                                                    \
  ios::sync_with_stdio(0);                                                     \
  cin.tie(0);                                                                  \
  cout.tie(0);
#define mem(a, v) memset((a), (v), sizeof(a))
#define FOR(i, a, n) for (int i = (a); i < (n); ++i)
#define FORE(i, a, n) for (int i = (a); i <= (n); ++i)
#define mp(a, b) make_pair(a, b)
#define pb(a) push_back(a)

#define anal '\n'

#define mod 1000000009

typedef long long ll;

int main() {

  IOS;

#ifndef ONLINE_JUDGE
  freopen("input.in", "r", stdin);
  freopen("output.in", "w", stdout);
#else
// online submission
#endif

  // -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-

  int k, a, b;
  cin >> k >> a >> b;

  while (a <= b) {
    if (a % k == 0) {
      cout << "OK";
      return 0;
    }
  }
  cout << "NG";
  return 0;
}


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

#define IOS                                                                    \
  ios::sync_with_stdio(0);                                                     \
  cin.tie(0);                                                                  \
  cout.tie(0);
#define mem(a, v) memset((a), (v), sizeof(a))
#define FOR(i, a, n) for (int i = (a); i < (n); ++i)
#define FORE(i, a, n) for (int i = (a); i <= (n); ++i)
#define mp(a, b) make_pair(a, b)
#define pb(a) push_back(a)

#define anal '\n'

#define mod 1000000009

typedef long long ll;

int main() {

  IOS;

#ifndef ONLINE_JUDGE
  freopen("input.in", "r", stdin);
  freopen("output.in", "w", stdout);
#else
// online submission
#endif

  // -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-

  int k, a, b;
  cin >> k >> a >> b;

  while (a <= b) {
    if (a % k == 0) {
      cout << "OK";
      return 0;
    }
    a++;
  }
  cout << "NG";
  return 0;
}
Problem p02693 (C++)

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

using namespace std;

int main() {
  int K, A, B;
  bool flag = 0;
  for (int i = A; i <= B; i++) {
    if (i % K == 0)
      flag = 1;
  }
  if (flag == 1)
    cout << "OK" << endl;
  else
    cout << "NG" << endl;
}

Fixed submission:
#include <iostream>

using namespace std;

int main() {
  int K, A, B;
  cin >> K >> A >> B;
  bool flag = 0;
  for (int i = A; i <= B; i++) {
    if (i % K == 0)
      flag = 1;
  }
  if (flag == 1)
    cout << "OK" << endl;
  else
    cout << "NG" << endl;
}
Problem p02693 (C++)

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

int main() {
  int K, A, B, flag = 0;
  cin >> A >> B;

  for (int i = A; i <= B; i++) {
    if (i % K == 0) {
      cout << "OK" << endl;
      flag = 1;
      break;
    }
  }
  if (flag != 1) {
    cout << "NG" << endl;
  }
}


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

int main() {
  int K, A, B, flag = 0;
  cin >> K >> A >> B;

  for (int i = A; i <= B; i++) {
    if (i % K == 0) {
      cout << "OK" << endl;
      flag = 1;
      break;
    }
  }
  if (flag != 1) {
    cout << "NG" << endl;
  }
}
Problem p02693 (C++)

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

using namespace std;

int main() {
  int a, b, k;
  cin >> a >> b;

  int res = (b - b % k);
  if (res < a) {
    cout << "NG";
  } else
    cout << "OK";
}


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

using namespace std;

int main() {
  int a, b, k;
  cin >> k >> a >> b;

  int res = (b - b % k);
  if (res < a) {
    cout << "NG";
  } else
    cout << "OK";
}
Problem p02693 (C++)

Buggy submission (status: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 1e5 + 5;
vector<ll> V;
int pre[maxn];
int main() {
  int k, a, b;
  cin >> a >> b;
  for (int i = a; i <= b; i++) {
    if (i % k == 0) {
      puts("OK");
      return 0;
    }
  }
  puts("NG");
  return 0;
}

Fixed submission:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 1e5 + 5;
vector<ll> V;
int pre[maxn];
int main() {
  int k, a, b;
  cin >> k >> a >> b;
  for (int i = a; i <= b; i++) {
    if (i % k == 0) {
      puts("OK");
      return 0;
    }
  }
  puts("NG");
  return 0;
}
Problem p02693 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <bits/stdc++.h>
using namespace std;
int main() {
  int k, a, b;
  cin >> k >> a >> b;
  bool f = 0;
  for (int i = a; a <= b; i++)
    if (i % k == 0)
      f = 1;
  cout << (f ? "OK" : "NG") << endl;
}

Fixed submission:
#include <bits/stdc++.h>
using namespace std;
int main() {
  int k, a, b;
  cin >> k >> a >> b;
  bool f = 0;
  for (int i = a; i <= b; i++)
    if (i % k == 0)
      f = 1;
  cout << (f ? "OK" : "NG") << endl;
}
Problem p02693 (C++)

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

int main() {
  int K, A, B;
  cin >> K >> A >> B;
  while (true) {
    bool add = false;
    for (int i = 0; i < 100; i++) {
      if (A <= K * i && B >= K * i) {
        add = true;
      }
    }
    if (add) {
      cout << "OK" << endl;
    } else {
      cout << "NG" << endl;
    }
  }
}


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

int main() {
  int k, a, b;
  cin >> k >> a >> b;
  if (a <= (b / k) * k) {
    cout << "OK" << endl;
  } else {
    cout << "NG" << endl;
  }
}
Problem p02693 (C++)

Buggy submission (status: Runtime Error):
#include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
typedef long long int ll;
#define pb push_back
typedef pair<ll, ll> pp;

ll mod = 1e9 + 7;
ll INF = 1e15;

ll powm(ll a, ll b, ll mod) {
  ll res = 1;
  while (b) {
    if (b & 1)
      res = (res * a) % mod;
    a = (a * a) % mod;
    b >> 1;
  }
  return res;
}
ll gcd(ll a, ll b);
ll power(ll x, ll y, ll m);

ll modInverse(ll a, ll m) {
  ll g = gcd(a, m);
  if (g != 1)
    return 1;
  else
    return power(a, m - 2, m);
}

ll power(ll x, ll y, ll m) {
  if (y == 0)
    return 1;
  ll p = power(x, y / 2, m) % m;
  p = (p * p) % m;

  return (y % 2 == 0) ? p : (x * p) % m;
}

ll gcd(ll a, ll b) {
  if (a == 0)
    return b;
  return gcd(b % a, a);
}

void solve() {
  int k, a, b, flag = 0;
  for (int i = a; i <= b; i++) {
    if (i % k == 0)
      flag = 1;
  }
  if (flag)
    cout << "OK\n";
  else
    cout << "NG\n";
}

int main() {
  int tc;
  // cin>>tc;
  tc = 1;
  while (tc--) {
    solve();
  }
}


Fixed submission:
#include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
typedef long long int ll;
#define pb push_back
typedef pair<ll, ll> pp;

ll mod = 1e9 + 7;
ll INF = 1e15;

ll powm(ll a, ll b, ll mod) {
  ll res = 1;
  while (b) {
    if (b & 1)
      res = (res * a) % mod;
    a = (a * a) % mod;
    b >> 1;
  }
  return res;
}
ll gcd(ll a, ll b);
ll power(ll x, ll y, ll m);

ll modInverse(ll a, ll m) {
  ll g = gcd(a, m);
  if (g != 1)
    return 1;
  else
    return power(a, m - 2, m);
}

ll power(ll x, ll y, ll m) {
  if (y == 0)
    return 1;
  ll p = power(x, y / 2, m) % m;
  p = (p * p) % m;

  return (y % 2 == 0) ? p : (x * p) % m;
}

ll gcd(ll a, ll b) {
  if (a == 0)
    return b;
  return gcd(b % a, a);
}

void solve() {
  int k, a, b, flag = 0;
  cin >> k >> a >> b;
  for (int i = a; i <= b; i++) {
    if (i % k == 0)
      flag = 1;
  }
  if (flag)
    cout << "OK\n";
  else
    cout << "NG\n";
}

int main() {
  int tc;
  // cin>>tc;
  tc = 1;
  while (tc--) {
    solve();
  }
}
Problem p02693 (Python)

Buggy submission (status: Runtime Error):
K = int(input())
A, B = map(int, input().slice())
print("OK" if B - A >= K else "NG")


Fixed submission:
K = int(input())
A, B = map(int, input().split())
large = (B // K) * K
if A <= large:
    print("OK")
else:
    print("NG")
Problem p02693 (C++)

Buggy submission (status: Runtime Error):
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#define mp make_pair
#define pb push_back
#define pii pair<int, int>
#define link(x) for (edge *j = h[x]; j; j = j->next)
#define inc(i, l, r) for (int i = l; i <= r; i++)
#define dec(i, r, l) for (int i = r; i >= l; i--)
const int MAXN = 3e5 + 10;
const double eps = 1e-8;
const int mod = 1e9 + 9;
#define ll long long
using namespace std;
struct edge {
  int t, v;
  edge *next;
} e[MAXN << 1], *h[MAXN], *o = e;
void add(int x, int y, int vul) {
  o->t = y;
  o->v = vul;
  o->next = h[x];
  h[x] = o++;
}
ll read() {
  ll x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-')
      f = -1;
    ch = getchar();
  }
  while (isdigit(ch))
    x = x * 10 + ch - '0', ch = getchar();
  return x * f;
}

int k, a, b;
int main() {
  k = read();
  a = read();
  b = read();
  int x = b / k * k;
  if (x >= a)
    return puts("OK");
  else
    puts("NG");
  return 0;
}


Fixed submission:
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#define mp make_pair
#define pb push_back
#define pii pair<int, int>
#define link(x) for (edge *j = h[x]; j; j = j->next)
#define inc(i, l, r) for (int i = l; i <= r; i++)
#define dec(i, r, l) for (int i = r; i >= l; i--)
const int MAXN = 3e5 + 10;
const double eps = 1e-8;
const int mod = 1e9 + 9;
#define ll long long
using namespace std;
struct edge {
  int t, v;
  edge *next;
} e[MAXN << 1], *h[MAXN], *o = e;
void add(int x, int y, int vul) {
  o->t = y;
  o->v = vul;
  o->next = h[x];
  h[x] = o++;
}
ll read() {
  ll x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-')
      f = -1;
    ch = getchar();
  }
  while (isdigit(ch))
    x = x * 10 + ch - '0', ch = getchar();
  return x * f;
}

int k, a, b;
int main() {
  k = read();
  a = read();
  b = read();
  int x = b / k * k;
  if (x >= a)
    puts("OK");
  else
    puts("NG");
  return 0;
}
Problem p02693 (C++)

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

int main() {
  int k;
  int a[1];
  cin >> k;
  for (int i = 0; i < 2; i++) {
    cin >> a[i];
  }
  if (a[1] - a[0] >= k - 1) {
    cout << "OK" << endl;
  } else {
    cout << "NG" << endl;
  }
  return 0;
}

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

int main() {
  int k, a, b;
  cin >> k >> a >> b;
  int i = b / k;
  if (k * i >= a) {
    cout << "OK" << endl;
  } else {
    cout << "NG" << endl;
  }
  return 0;
}
Problem p02693 (C++)

Buggy submission (status: Runtime Error):
#include "bits/stdc++.h"
#define EPS 1e-9
using namespace std;
const int N = 1e5, OO = 0x3f3f3f3f;
typedef long long ll;
int main() {
  int a, b, k;
  for (int i = min(a, b); i <= max(a, b); i++)
    if (i % k == 0)
      return cout << "OK", 0;
  cout << "NG";
}

Fixed submission:
#include "bits/stdc++.h"
#define EPS 1e-9
using namespace std;
const int N = 1e5, OO = 0x3f3f3f3f;
typedef long long ll;
int main() {
  int a, b, k;
  cin >> k >> a >> b;
  for (int i = a; i <= b; i++)
    if (i % k == 0)
      return cout << "OK", 0;
  cout << "NG";
}
Problem p02693 (C++)

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

int main() {
  int k, a, b;
  cin >> k >> a >> b;
  for (ll i = a; i = b; ++i) {
    if (i % k == 0) {
      cout << "OK" << endl;
      return 0;
    }
  }
  cout << "NG" << endl;
}


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

int main() {
  int k, a, b;
  cin >> k >> a >> b;
  for (ll i = a; i <= b; ++i) {
    if (i % k == 0) {
      cout << "OK" << endl;
      return 0;
    }
  }
  cout << "NG" << endl;
}
Problem p02693 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1e18, MOD = 1e9 + 7;
const int INT_INF = 1e9, INT_MOD = 1e9 + 7;
#define rep(i, N) for (int i = 0; i < N; i++)
typedef pair<int, int> Pi;
typedef pair<double, double> P;
signed main() {
  int k, a, b;
  cin >> k >> a >> b;
  for (int i = a; i <= b; i++) {
    if (i %= k == 0) {
      cout << "OK" << endl;
      return 0;
    }
  }
  cout << "NG" << endl;
  return 0;
}

Fixed submission:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1e18, MOD = 1e9 + 7;
const int INT_INF = 1e9, INT_MOD = 1e9 + 7;
#define rep(i, N) for (int i = 0; i < N; i++)
typedef pair<int, int> Pi;
typedef pair<double, double> P;
signed main() {
  int k, a, b;
  cin >> k >> a >> b;
  for (int i = a; i <= b; i++) {
    if (i % k == 0) {
      cout << "OK" << endl;
      return 0;
    }
  }
  cout << "NG" << endl;
  return 0;
}
Problem p02693 (C++)

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

#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define reps(i, s, n) for (int i = (int)s; i < (int)n; i++)
#define in(i) std::cin >> i;
#define print(i) std::cout << i;
#define println(i) std::cout << i << std::endl;
using namespace std;

int main() {
  int k, a, b, i = 0;
  string ans = "NG";

  cin >> k >> a >> b;

  while (1) {
    if (k * i >= a && k * i <= b) {
      ans = "OK";
      break;
    } else if (k * i > b) {
      break;
    }
  }

  cout << ans << endl;

  return 0;
}

Fixed submission:
#include <algorithm>
#include <iostream>
#include <map>
#include <vector>

#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define reps(i, s, n) for (int i = (int)s; i < (int)n; i++)
#define in(i) std::cin >> i;
#define print(i) std::cout << i;
#define println(i) std::cout << i << std::endl;
using namespace std;

int main() {
  int k, a, b, i = 0;
  string ans = "NG";

  cin >> k >> a >> b;

  while (1) {
    if (k * i >= a && k * i <= b) {
      ans = "OK";
      break;
    } else if (k * i > b) {
      break;
    }
    i++;
  }

  cout << ans << endl;

  return 0;
}
Problem p02693 (C++)

Buggy submission (status: Runtime Error):
#include <iostream>
using namespace std;

int countDivisibles(int A, int B, int M) {
  bool check = false;

  for (int i = A; i <= B; i++) {
    if (i % M == 0)
      check = true;
  }
  if (check)
    cout << "OK" << endl;
  else {
    cout << "NG" << endl;
  }
}
int main() {
  int A, B, M;
  cin >> M;
  cin >> A >> B;
  countDivisibles(A, B, M);

  return 0;
}


Fixed submission:
#include <iostream>
using namespace std;

void countDivisibles(int A, int B, int M) {
  bool check = false;

  for (int i = A; i <= B; i++) {
    if (i % M == 0)
      check = true;
  }
  if (check)
    cout << "OK" << endl;
  else {
    cout << "NG" << endl;
  }
}
int main() {
  int A, B, M;
  cin >> M;
  cin >> A >> B;
  countDivisibles(A, B, M);

  return 0;
}
Problem p02693 (C++)

Buggy submission (status: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define irep(i, a, b) for (typeof(i) i = (a); i < (b); ++i)
#define itrep(it, c) for (auto it = (c).begin(); it != (c).end(); ++it)

int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);

  ll K, A, B;
  cin >> K >> A >> B;

  for (ll i = A; i <= B; i++) {
    if (i % K == 0) {
      cout << "OK" << endl;
      return 1;
    }
  }
  cout << "NG" << endl;
}


Fixed submission:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define irep(i, a, b) for (typeof(i) i = (a); i < (b); ++i)
#define itrep(it, c) for (auto it = (c).begin(); it != (c).end(); ++it)

int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);

  ll K, A, B;
  cin >> K >> A >> B;

  for (ll i = A; i <= B; i++) {
    if (i % K == 0) {
      cout << "OK" << endl;
      return 0;
    }
  }
  cout << "NG" << endl;
}
Problem p02694 (C++)

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

int main() {
  int X;
  int Y = 100;
  int C = 0;
  cin >> X;
  while (Y < X) {
    Y += Y / 100;
    C++;
  }
  cout << (C) << endl;
}

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

int main() {
  long X;
  long Y = 100;
  long C = 0;
  cin >> X;
  while (Y < X) {
    Y += Y / 100;
    C++;
  }
  cout << (C) << endl;
}
Problem p02694 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define _GLIBCXX_DEBUG

int main() {
  using vi = vector<int>;

  int a = 100;
  int count = 0;
  int x;
  cin >> x;
  while (a < x) {
    count++;
    a *= 1.01;
  }
  cout << count << endl;
}

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

int main() {
  using vi = vector<int>;

  long long a = 100;
  long long count = 0;
  long long x;
  cin >> x;
  while (a < x) {
    count++;
    a *= 1.01;
  }
  cout << count << endl;
}
Problem p02694 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <algorithm>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
// #include <bits/stdc++.h>

using namespace std;

#define FOR(i, a, b) for (int i = (a), i##formax = (b); i < i##formax; i++)
typedef long long ll;

int main() {
  ll x;
  cin >> x;
  ll deposit = 100;
  ll year = 0;
  while (true) {
    deposit += deposit / 100 % 10;
    year++;
    if (deposit >= x)
      break;
  }
  cout << year << endl;
  return 0;
}

Fixed submission:
#include <algorithm>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
// #include <bits/stdc++.h>

using namespace std;

#define FOR(i, a, b) for (int i = (a), i##formax = (b); i < i##formax; i++)
typedef long long ll;

int main() {
  ll x;
  cin >> x;
  ll deposit = 100;
  ll year = 0;
  while (true) {
    deposit += deposit / 100;
    year++;
    if (deposit >= x)
      break;
  }
  cout << year << endl;
  return 0;
}
Problem p02694 (C++)

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

int main() {
  long long X;
  cin >> X;
  int sum = 0;
  int mon = 100;
  while (mon < X) {
    mon += mon / 100;
    sum++;
  }

  cout << sum << endl;
}


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

int main() {
  long long X;
  cin >> X;
  int sum = 0;
  long long mon = 100;
  while (mon < X) {
    mon += mon / 100;
    sum++;
  }

  cout << sum << endl;
}
Problem p02694 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <iostream>
using namespace std;

int main() {
  int x, a = 100, i = 0;
  cin >> x;
  for (; a < x; i += 1) {
    a *= 1.01;
  }
  cout << i << endl;
  return 0;
}

Fixed submission:
#include <iostream>
using namespace std;

int main() {
  long long x, a = 100, i = 0;
  cin >> x;
  for (; a < x; i += 1) {
    a *= 1.01;
  }
  cout << i << endl;
  return 0;
}
Problem p02694 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <iostream>
using namespace std;
int main() {
  long long x;
  cin >> x;
  long long money = 100;
  int i;
  for (i = 0; money < x; i++) {
    money = money * 101 / 100;
  }
  cout << i << endl;
}

Fixed submission:
#include <iostream>
using namespace std;
int main() {
  long long x;
  cin >> x;
  long long money = 100;
  int i;
  for (i = 0; money < x; i++) {
    money = money + money / 100;
  }
  cout << i << endl;
}
Problem p02694 (C++)

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

int main() {
  ll X;
  cin >> X;
  int r = 100;
  ll ans = 0;
  while (r < X) {
    r = r * 1.01;
    ans++;
  }
  cout << ans << endl;
}

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

int main() {
  ll X;
  cin >> X;
  ll r = 100;
  ll ans = 0;
  while (r < X) {
    r = r * 1.01;
    ans++;
  }
  cout << ans << endl;
}
Problem p02694 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <iostream>
using namespace std;
int main() {
  int x, y = 100, i = 0;
  cin >> x;
  for (; y < x; i++) {
    y *= 1.01;
  }
  cout << i;
}

Fixed submission:
#include <iostream>
using namespace std;
int main() {
  long long x, y = 100, i = 0;
  cin >> x;
  for (; y < x; i++) {
    y *= 1.01;
  }
  cout << i;
}
Problem p02694 (C++)

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

#define SIZE_OF_ARRAY(array) sizeof(array) / sizeof(array[0])

int main() {
  long long X;
  cin >> X;
  int year = 0;
  for (int i = 100; i < X;) {
    i *= 1.01;
    year++;
  }
  cout << year;
}

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

#define SIZE_OF_ARRAY(array) sizeof(array) / sizeof(array[0])

int main() {
  long long X;
  cin >> X;
  long long year = 0;
  for (long long i = 100; i < X;) {
    i += i * 0.01;
    year++;
  }
  cout << year;
}
Problem p02694 (C++)

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

using namespace std;

int main() {
  long X, deposit;
  cin >> X;
  long i = 0;
  deposit = 1;
  while (deposit < X) {
    deposit *= 1.01;
    i++;
  }

  cout << i << endl;
  return 0;
}

Fixed submission:
#include <iostream>

using namespace std;

int main() {
  long X, deposit;
  cin >> X;
  long i = 0;
  deposit = 100;
  while (deposit < X) {
    deposit *= 1.01;
    i++;
  }

  cout << i << endl;
  return 0;
}
Problem p02694 (C++)

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

int main() {
  int x, i, sum;
  i = 0;
  sum = 100;
  cin >> x;
  while (sum < x) {
    sum = sum * 1.01;
    i++;
  }
  cout << i << endl;
  return 0;
}


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

int main() {
  long long x, i, sum;
  i = 0;
  sum = 100;
  cin >> x;
  while (sum < x) {
    sum = sum * 1.01;
    i++;
  }
  cout << i << endl;
  return 0;
}
Problem p02694 (C++)

Buggy submission (status: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define pb push_back
#define fi first
#define se second
const int N = 3e5 + 6;
const int mod = 1e9 + 7;
const int inf = 1e8;
void solve() {
  ll k;
  cin >> k;
  ll st = 100;
  for (int i = 0; i <= 40000; i++) {
    if (st >= k) {
      cout << i << endl;
      break;
    }
    ll interst = st * 0.01;
    st += interst;
  }
  exit(-1);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  //    cin>>t;
  while (t--)
    solve();
  return 0;
}


Fixed submission:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define pb push_back
#define fi first
#define se second
const int N = 3e5 + 6;
const int mod = 1e9 + 7;
const int inf = 1e8;
void solve() {
  ll k;
  cin >> k;
  ll st = 100;
  for (int i = 0; i <= 40000; i++) {
    if (st >= k) {
      cout << i << endl;
      return;
    }
    ll interst = st * 0.01;
    st += interst;
  }
  exit(-1);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  //    cin>>t;
  while (t--)
    solve();
  return 0;
}
Problem p02694 (C++)

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

int main() {
  long long a;
  cin >> a;
  int t = 0;
  long long k = 100;
  while (k != a) {
    k = k * 1.01;
    t++;
  }
  cout << t;
}

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

int main() {
  long long a;
  cin >> a;
  int t = 0;
  long long k = 100;
  while (k < a) {
    k = k * 1.01;
    t++;
  }
  cout << t;
}
Problem p02694 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <iostream>
#include <math.h>
using namespace std;

int main() {
  int InVal = 100;
  int x;
  int years = 0;
  cin >> x;
  while (InVal < x) {
    InVal = floor(InVal * 1.01);
    ++years;
  }
  cout << years << endl;
  return 0;
}

Fixed submission:
#include <iostream>
#include <math.h>
using namespace std;

int main() {
  long long InVal = 100;
  long long x;
  long long years = 0;
  cin >> x;
  while (InVal < x) {
    InVal = floor(InVal * 1.01);
    ++years;
  }
  cout << years << endl;
  return 0;
}
Problem p02694 (C++)

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

int main() {
  int money = 100;
  int X;
  cin >> X;
  int year = 0;

  while (money < X) {
    money = money + money / 100;
    year++;
  }

  cout << year << endl;
}


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

int main() {
  long long money = 100;
  long long X;
  cin >> X;
  int year = 0;

  while (money < X) {
    money = money + money / 100;
    year++;
  }

  cout << year << endl;
}
Problem p02694 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <iostream>
using namespace std;

int main() {
  double x;
  int i, a = 100;

  cin >> x;

  for (i = 0; a < x; i++) {
    a = a * 1.01;
  }

  cout << i << endl;
}

Fixed submission:
#include <iostream>
using namespace std;

int main() {
  double x;
  long i, a = 100;

  cin >> x;

  for (i = 0; a < x; i++) {
    a = a * 1.01;
  }

  cout << i << endl;
}
Problem p02694 (C++)

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

#define START 100

using namespace std;

int main() {
  int year, money, value;
  long x;

  cin >> x;

  money = START;
  year = 0;

  while (money < x) {
    value = money / 100;
    money += value;
    year++;
  }

  cout << year;
}


Fixed submission:
#include <cmath>
#include <iostream>
#include <string>

#define START 100

using namespace std;

int main() {
  int year;
  long x, money, value;

  cin >> x;

  money = START;
  year = 0;

  while (money < x) {
    value = money / 100;
    money += value;
    year++;
  }

  cout << year;
}
Problem p02694 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define fast                                                                   \
  ios_base::sync_with_stdio(false);                                            \
  cin.tie(NULL);
#define pp pop_back
#define in insert
#define ff first
#define ss second
#define e endl
#define MAXN 2005
#define MOD 998244353
int main() {
  ll x;
  cin >> x;
  ll a = 100;
  ll t = 0;
  while (a < x) {

    a = a * 101;
    a = a / 100;
    t++;
  }
  cout << t;
}


Fixed submission:
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define fast                                                                   \
  ios_base::sync_with_stdio(false);                                            \
  cin.tie(NULL);
#define pp pop_back
#define in insert
#define ff first
#define ss second
#define e endl
#define MAXN 2005
#define MOD 998244353
int main() {
  ll x;
  cin >> x;
  ll a = 100;
  ll t = 0;
  while (a < x && t <= 4000) {
    a *= 1.01;
    t++;
  }
  cout << t;
}
Problem p02694 (C++)

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

using namespace std;
int main() {
  // prepare variables
  int init_value = 100;
  long int target_value;
  cin >> target_value;

  // calculate answer
  int ans = 0;
  long int stock = init_value;
  while (ans <= 1e18) {
    stock = (int)(stock * 1.01);
    ans++;
    if (stock >= target_value) {
      break;
    }
  }
  cout << ans << endl;
  return 0;
}


Fixed submission:
#include <cmath>
#include <iostream>

using namespace std;
int main() {
  // prepare variables
  int init_value = 100;
  long int target_value;
  cin >> target_value;

  // calculate answer
  int ans = 0;
  long int stock = init_value;
  while (ans <= 1e18) {
    stock = (long int)(stock * 1.01);
    ans++;
    if (stock >= target_value) {
      break;
    }
  }
  cout << ans << endl;
  return 0;
}
Problem p02694 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;

int main() {

  long long X;
  long long ans = 100;
  int i = 0;
  cin >> X;

  while (ans < X) {
    ans *= 101;
    ans /= 100;
    i++;
  }

  cout << i;
}


Fixed submission:
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;

int main() {

  long long X;
  long long ans = 100;
  int i = 0;
  cin >> X;

  while (ans < X) {
    ans += ans / 100;
    i++;
  }

  cout << i;
}
Problem p02694 (C++)

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

int main() {
  long long x, y = 100, cnt = 0;
  cin >> x;

  while (true) {
    if (x <= y) {
      cout << cnt << endl;
      return 0;
    }
    cnt++;
    y = y * 20.1 / 20;
  }
}


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

int main() {
  long long x, y = 100, cnt = 0;
  cin >> x;

  while (true) {
    if (x <= y) {
      cout << cnt << endl;
      return 0;
    }
    cnt++;
    y = y + y / 100;
  }
}
Problem p02694 (C++)

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

int main() {
  long long x;
  cin >> x;
  long long s = 100;
  int res = 0;
  while (s < x) {
    s = s + s * 0.01;
    res++;
  }
  cout << res;
  return res;
}

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

int main() {
  long long x;
  cin >> x;
  long long s = 100;
  int res = 0;
  while (s < x) {
    s = s + s * 0.01;
    res++;
  }
  cout << res;
  return 0;
}
Problem p02694 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep2(i, a, n) for (int i = a; i < n; i++)
using namespace std;
long long X;
int main() {
  cin >> X;
  long long res = 0;
  long long money = 100;
  while (money < X) {
    money = money * 101 / 100;
    res++;
  }
  cout << res << endl;
  return 0;
}


Fixed submission:
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep2(i, a, n) for (int i = a; i < n; i++)
using namespace std;
long long X;
int main() {
  cin >> X;
  long long res = 0;
  long long money = 100;
  while (money < X) {
    money = money * 1.01;
    res++;
  }
  cout << res << endl;
  return 0;
}
Problem p02694 (C++)

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

int main() {
  int a = 100;
  long long x;
  cin >> x;
  int i = 0;

  while (a < x) {
    a += a / 100;

    i++;
  }
  cout << i << endl;
}

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

int main() {
  long long a = 100;
  long long x;
  cin >> x;
  int i = 0;

  while (a < x) {
    a += a / 100;

    i++;
  }
  cout << i << endl;
}
Problem p02694 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, i;
  b = 100;
  i = 0;
  cin >> a;
  while (b < a) {
    b = (b * 101) / 100;
    i++;
  }
  cout << i;
}

Fixed submission:
#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, i;
  b = 100;
  i = 0;
  cin >> a;
  while (b < a) {
    long long c = b / 100;
    b = b + c;
    i++;
  }
  cout << i;
}
Problem p02694 (C++)

Buggy submission (status: Time Limit Exceeded):
#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() {
  ll x;
  cin >> x;
  ll ans = 0;
  ll y = 100;
  while (y < x) {
    y = y * 101 / 100;
    // cout << y << endl;
    ans++;
  }
  cout << ans << endl;
  return 0;
}

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() {
  ll x;
  cin >> x;
  ll ans = 0;
  ll y = 100;
  while (y < x) {
    y += y / 100;
    // cout << y << endl;
    ans++;
  }
  cout << ans << endl;
  return 0;
}
Problem p02694 (C++)

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

using namespace std;

int main() {
  int x, d = 100, y = 0;
  cin >> x;
  while (d < x) {
    d = d * 1.01;
    y++;
  }
  cout << y << endl;

  return 0;
}


Fixed submission:
#include <iostream>

using namespace std;

int main() {
  long x, d = 100, y = 0;
  cin >> x;
  while (d < x) {
    d = d * 1.01;
    y++;
  }
  cout << y << endl;

  return 0;
}
Problem p02694 (C++)

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

using namespace std;

int main(void) {
  long long X;
  cin >> X;

  long long ykn = 100;

  int ans = 0;
  while (ykn < X) {
    ans++;
    ykn = ykn * 101 / 100;
  }

  cout << ans << endl;
  return 0;
}

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

using namespace std;

int main(void) {
  long long X;
  cin >> X;

  long long ykn = 100;

  int ans = 0;
  while (ykn < X) {
    ans++;
    ykn += ykn / 100;
  }

  cout << ans << endl;
  return 0;
}
Problem p02694 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, cnt = 100;
  cin >> a;
  for (int i = 0;; i++) {
    cnt = cnt + cnt / 100;
    if (cnt == a) {
      cout << i + 1;
      return 0;
    }
  }
  return 0;
}


Fixed submission:
#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, cnt = 100;
  cin >> a;
  for (int i = 0;; i++) {
    cnt = cnt + cnt / 100;
    if (cnt >= a) {
      cout << i + 1;
      return 0;
    }
  }
  return 0;
}
Problem p02694 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define ALL(a) (a).begin(), (a).end()
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main() {
  ll x, m = 100, ans = 0;
  cin >> x;
  while (true) {
    m = m * 101 / 100;
    ++ans;
    if (m >= x)
      break;
  }
  cout << ans << endl;
}


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

int main() {
  ll x, m = 100, ans = 0;
  cin >> x;
  while (true) {
    m = m * 1.01;
    ++ans;
    if (m >= x)
      break;
  }
  cout << ans << endl;
}
Problem p02694 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define int long long
#define big 998244353
#define ff first
#define se second
#define pb push_back
#define pii pair<int, int>
#define fast                                                                   \
  ios_base::sync_with_stdio(0);                                                \
  cin.tie(0);                                                                  \
  cout.tie(0)
#define PSET(x, y) fixed << setprecision(y) << x
#define mp make_pair
#define pi 3.141592653589
int power(int x, int y) {
  int r = 1, z = x;
  while (y) {
    if (y & 1)
      r *= z;
    z *= z;
    y = y >> 1;
  }
  return r;
}
int powerm(int x, int y, int p) {
  int r = 1;
  while (y) {
    if (y & 1)
      r = (r * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return r % p;
}
int modinv(int x, int m) { return powerm(x, m - 2, m); }
int logarithm(int a, int b) {
  int x = 0;
  while (a > 1) {
    x++;
    a /= b;
  }
  return x;
}
int32_t main() {
  fast;
  int x;
  cin >> x;
  int curr = 100;
  int t = 0;
  while (curr < x) {
    t++;
    curr = curr * 101 / 100;
  }
  cout << t;
  return 0;
}

Fixed submission:
#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define int long long
#define big 998244353
#define ff first
#define se second
#define pb push_back
#define pii pair<int, int>
#define fast                                                                   \
  ios_base::sync_with_stdio(0);                                                \
  cin.tie(0);                                                                  \
  cout.tie(0)
#define PSET(x, y) fixed << setprecision(y) << x
#define mp make_pair
#define pi 3.141592653589
int power(int x, int y) {
  int r = 1, z = x;
  while (y) {
    if (y & 1)
      r *= z;
    z *= z;
    y = y >> 1;
  }
  return r;
}
int powerm(int x, int y, int p) {
  int r = 1;
  while (y) {
    if (y & 1)
      r = (r * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return r % p;
}
int modinv(int x, int m) { return powerm(x, m - 2, m); }
int logarithm(int a, int b) {
  int x = 0;
  while (a > 1) {
    x++;
    a /= b;
  }
  return x;
}
int32_t main() {
  fast;
  int x;
  cin >> x;
  int curr = 100;
  int t = 0;
  while (curr < x) {
    t++;
    curr = curr * 1.01;
  }
  cout << t;
  return 0;
}
Problem p02694 (C++)

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

using namespace std;

typedef long long int ll;

#define FOR(i, l, r) for (i = l; i < r; i++)

#define REP(i, n) FOR(i, 0, n)

#define ALL(x) x.begin(), x.end()

#define P pair<ll, ll>

#define F first

#define S second

signed main() {

  ll X, i = 100, ans = 0;
  cin >> X;

  while (i < X) {
    ans++;
    i = i * 101 / 100;
  }
  cout << ans << endl;

  return 0;
}

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

using namespace std;

typedef long long int ll;

#define FOR(i, l, r) for (i = l; i < r; i++)

#define REP(i, n) FOR(i, 0, n)

#define ALL(x) x.begin(), x.end()

#define P pair<ll, ll>

#define F first

#define S second

signed main() {

  ll X, i = 100, ans = 0;
  cin >> X;

  while (i < X) {
    ans++;
    i += i / 100;
  }
  cout << ans << endl;

  return 0;
}
Problem p02694 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <bits/stdc++.h>
#define console
using namespace std;
#ifndef console
ifstream fin("data.in");
ofstream fout("data.out");
#else
#define fin cin
#define fout cout
#endif
#define usain_bolt()                                                           \
  (ios_base::sync_with_stdio(false), fin.tie(NULL), fout.tie(NULL))
typedef long long ll;
int main() {
  usain_bolt();
  ll x;
  fin >> x;
  int p = 100, rez = 0;
  while (p < x) {
    p += p / 100;
    ++rez;
  }
  fout << rez;
#ifndef console
  fin.close(), fout.close();
#endif
  return 0;
}


Fixed submission:
#include <bits/stdc++.h>
#define console
using namespace std;
#ifndef console
ifstream fin("data.in");
ofstream fout("data.out");
#else
#define fin cin
#define fout cout
#endif
#define usain_bolt()                                                           \
  (ios_base::sync_with_stdio(false), fin.tie(NULL), fout.tie(NULL))
typedef long long ll;
int main() {
  usain_bolt();
  ll x;
  fin >> x;
  ll p = 100, rez = 0;
  while (p < x) {
    p += p / 100;
    ++rez;
  }
  fout << rez;
#ifndef console
  fin.close(), fout.close();
#endif
  return 0;
}
Problem p02694 (C++)

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

int main() {
  int X, sum = 100, i = 0;
  cin >> X;
  while (sum < X) {
    sum += sum / 100;
    i++;
  }
  cout << i;
}


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

int main() {
  long X, sum = 100, i = 0;
  cin >> X;
  while (sum < X) {
    sum += sum / 100;
    i++;
  }
  cout << i;
}
Problem p02694 (C++)

Buggy submission (status: Time Limit Exceeded):
#include <iostream>
using namespace std;
int main() {
  int X, num = 100, cou = 0;
  cin >> X;
  while (true) {
    num += num * 0.01;
    cou++;
    if (num >= X)
      break;
  }
  cout << cou << endl;
}

Fixed submission:
#include <iostream>
using namespace std;
int main() {
  unsigned long int X, num = 100;
  int cou = 0;
  cin >> X;
  while (true) {
    num += num * 0.01;
    cou++;
    if (num >= X)
      break;
  }
  cout << cou << endl;
}
Problem p02694 (C++)

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

int main() {
  long long x, count = 0;
  cin >> x;
  long long a = 100;
  while (a < x) {
    a += (1 / 100) * a;
    count++;
  }
  cout << count << endl;
  return 0;
}

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

int main() {
  long long x, count = 0;
  cin >> x;
  long long a = 100;
  while (a < x) {
    a += a / 100;
    count++;
  }
  cout << count << endl;
  return 0;
}
Problem p02694 (C++)

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

int main() {
  int a = 100, x;
  int year = 0;

  cin >> x;

  while (a < x) {
    a = a * 1.01;
    year = year + 1;
  }

  cout << year << endl;
}


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

int main() {
  long long a, x;
  a = 100;
  int year = 0;

  cin >> x;

  while (a < x) {
    a = a * 1.01;
    year = year + 1;
  }

  cout << year << endl;
}