alexjercan/bugnet huggingface dataset:
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

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

#define ll long long
#define MOD 1000000007
#define PI 3.1415

int main() {
  ll x;
  cin >> x;

  ll v = 100;
  ll co = 0;
  while (x > v) {
    v = v + (v / 100);
    co++;
  }
  cout << co << endl;
}


Error: TLE

Fixed submission:

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

#define ll long long
#define MOD 1000000007
#define PI 3.1415

int main() {
  ll x;
  cin >> x;

  ll v = 100;
  ll co = 0;
  while (x > v) {
    v *= 101;
    v /= 100;
    co++;
  }
  cout << co << endl;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <bits/stdc++.h>
#include <cmath>
using namespace std;
int main() {

  unsigned long long X, current = 100;
  cin >> X;

  int year = 0;

  while (current < X) {
    current = current * 1.01;
    year++;
  }

  cout << year << endl;

  return 0;
}

Error: TLE

Fixed submission:

#include <bits/stdc++.h>
using namespace std;
int main() {

  int X, M, i;
  cin >> X;

  M = 100;

  for (i = 0; M < X; i++) {
    M = M * 1.01;
  }

  cout << i << endl;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <bits/stdc++.h>
using namespace std;
#define SPEED                                                                  \\
  ios::sync_with_stdio(false);                                                 \\
  cin.tie(0);                                                                  \\
  cout.tie(0)
#define fileio freopen("in.in", "r", stdin), freopen("out.out", "w", stdout);
#define ll long long int
#define FF first
#define SS second
#define mp make_pair
#define pb push_back
#define pii pair<int, int>
#define pll pair<long long int, long long int>
#define sd(x) scanf("%d", &x)
#define slld(x) scanf("%lld", &x)
#define pd(x) printf("%d\\n", x)
#define plld(x) printf("%lld\\n", x)
#define pss printf
#define MOD 1000000007
#define INF 1e18
#define eps 0.00001
#define endl '\\n'
#define debug(n1) cout << n1 << endl
const int N = 1e5; // limit for array size
ll n;              // array size

int main() {
  // cout<<setprecision(50);
  ll x;
  cin >> x;

  int ans = 1;
  ll temp = 100;

  while (floor(temp * 1.01) < (x)) {
    ans++;
    temp = floor(temp * 1.01);
    // cout<<x<<endl;
    // cout<<temp<<endl;
  }

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

Error: TLE

Fixed submission:

#include <bits/stdc++.h>
using namespace std;
#define SPEED                                                                  \\
  ios::sync_with_stdio(false);                                                 \\
  cin.tie(0);                                                                  \\
  cout.tie(0)
#define fileio freopen("in.in", "r", stdin), freopen("out.out", "w", stdout);
#define ll long long int
#define FF first
#define SS second
#define mp make_pair
#define pb push_back
#define pii pair<int, int>
#define pll pair<long long int, long long int>
#define sd(x) scanf("%d", &x)
#define slld(x) scanf("%lld", &x)
#define pd(x) printf("%d\\n", x)
#define plld(x) printf("%lld\\n", x)
#define pss printf
#define MOD 1000000007
#define INF 1e18
#define eps 0.00001
#define endl '\\n'
#define debug(n1) cout << n1 << endl
const int N = 1e5; // limit for array size
ll n;              // array size

int main() {
  // cout<<setprecision(50);
  ll x;
  cin >> x;
  /*float cc=(log(1.01));
  x/=100;
  float cc1=log(x);
  float ans=cc1/cc;
  */
  int ans = 1;
  ll temp = 100;

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

  cout << ans << endl;
  return 0;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <algorithm>
#include <iomanip>
#include <iostream>
#include <set>
#include <string>
#include <vector>

#define _USE_MATH_DEFINES
#include <math.h>

using namespace std;
int main() {
  long long X;
  cin >> X;

  long long ans = 0, money = 100;
  while (money < X) {
    money += money / 100;
    ++ans;
  }

  cout << ans << endl;
}

Error: TLE

Fixed submission:

#include <algorithm>
#include <iomanip>
#include <iostream>
#include <set>
#include <string>
#include <vector>

#define _USE_MATH_DEFINES
#include <math.h>

using namespace std;

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

  int ans = 0, money = 100;
  while (money < X) {
    money *= 1.01;
    ++ans;
  }

  cout << ans << endl;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <bits/stdc++.h>
using namespace std;
int main() {
  long long X;
  cin >> X;
  long long P = 100, step = 0;
  while (P < X) {
    P += P / 100;
    step++;
  }
  cout << step << endl;
  return 0;
}

Error: TLE

Fixed submission:

#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x, i, tt = 0;
  cin >> x;
  for (i = 100; i < x; i += 0) {
    int a;
    a = int(i / 100);
    i += a;
    tt++;
  }
  cout << tt;
  return 0;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <algorithm>
#include <climits>
#include <cmath>
#include <fstream>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())

using namespace std;
typedef long long ll;

int main() {
#ifdef RUN_LOCAL
  ifstream in("../input.txt");
  cin.rdbuf(in.rdbuf());
#endif

  cin.tie(0);
  ios::sync_with_stdio(false);

  unsigned long long a = 100;
  unsigned long long x;
  cin >> x;
  unsigned long long cnt = 0;
  while (a < x) {
    a = a + a / 100;
    ++cnt;
  }

  cout << cnt << endl;

  return 0;
}


Error: TLE

Fixed submission:

#include <algorithm>
#include <climits>
#include <cmath>
#include <fstream>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())

using namespace std;
typedef long long ll;

int main() {
#ifdef RUN_LOCAL
  ifstream in("../input.txt");
  cin.rdbuf(in.rdbuf());
#endif

  cin.tie(0);
  ios::sync_with_stdio(false);

  ll a = 100;
  ll x;
  cin >> x;
  ll cnt = 0;
  while (a < x) {
    a = (a * 101) / 100;
    ++cnt;
  }

  cout << cnt << endl;

  return 0;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
#include <math.h>
#include <string.h>

using namespace std;

int main() {
  int tc, i, j;
  ;

  long long n;
  cin >> n;

  long long ans = 0;
  long long awal = 100;
  while (awal < n) {
    awal = awal * 1.01;
    ans++;
  }

  cout << ans << "\\n";
  return 0;
}

Error: TLE

Fixed submission:

#include <iostream>
#include <math.h>
#include <string.h>

using namespace std;

int main() {
  int tc, i, j;
  ;

  long long n;
  cin >> n;

  long long ans = 0;
  int awal = 100, bunga = 0;
  while (awal < n) {
    awal = awal * 1.01;
    ans++;
  }

  cout << ans << "\\n";
  return 0;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <algorithm>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define ill long long
#define fcout cout << fixed << setprecision(10)
using namespace std;

int main() {
  ill x;
  cin >> x;
  ill n = 100;
  for (int i = 1; 1; i++) {
    n *= 1.01;
    if (n >= x) {
      cout << i;
      return 0;
    }
  }
}

Error: TLE

Fixed submission:

#include <algorithm>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define ill long long
#define fcout cout << fixed << setprecision(10)
using namespace std;

int main() {
  int x;
  cin >> x;
  int n = 100;
  for (int i = 1; 1; i++) {
    n *= 1.01;
    if (n >= x) {
      cout << i;
      return 0;
    }
  }
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
using namespace std;

int main() {
  long int X;
  long int yen = 100;
  long int year = 0;

  cin >> X;

  if (10000000 > X) {
    while (yen < X) {
      yen = yen + yen / 100;
      year++;
    }
  }

  if (10000000 <= X) {
    year = 1215;
    yen = 10091727;

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

  cout << year << endl;

  return 0;
}

Error: TLE

Fixed submission:

#include <iostream>
using namespace std;

int main() {
  int X;
  int yen = 100;
  int year = 0;

  cin >> X;

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

  cout << year << endl;

  return 0;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
using namespace std;
using ll = long long;

int main() {
  ll x, step = 0, bank = 100;
  cin >> x;

  while (bank < x) {
    step++;
    bank += bank / 100;
  }
  // for (int i = 0;;i++ ) {
  //     if (bank > x)
  // }
  cout << step << endl;
  return 0;
}

Error: TLE

Fixed submission:

#include <iostream>
using namespace std;

int main() {
  int x, bank = 100;
  cin >> x;
  for (int i = 0;; i++) {
    bank += 0.01 * bank;
    if (bank > x)
      cout << i << endl;
  }
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

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

int main() {
  long long X, year, money;
  cin >> X;
  money = 100;
  year = 0;
  while (money < X) {
    year++;
    money += (money / 100);
  }
  cout << year << endl;
}

Error: TLE

Fixed submission:

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

int main() {
  long long X, money, years;
  cin >> X;
  money = 100;
  years = 0;
  while (X > money) {
    years++;
    money *= 101;
    money /= 100;
  }
  cout << years << endl;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

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

int main() {
  int64_t X;
  cin >> X;
  int64_t j = 100, i = 0;
  for (; j < X; i++)
    j += j / 100;
  cout << i << endl;
}

Error: TLE

Fixed submission:

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

int main() {
  int X;
  cin >> X;
  int j = 100, i = 0;
  for (; j < X; i++)
    j = j * 101 / 100;
  cout << i << endl;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <bits/stdc++.h>
#include <math.h>
#define _GLIBCXX_DEBUG
using namespace std;
int main() {

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

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

  cout << ans << endl;
}

Error: TLE

Fixed submission:

#include <bits/stdc++.h>
#include <math.h>
#define _GLIBCXX_DEBUG
using namespace std;
int main() {

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

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

  cout << ans << endl;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

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

int main() {
  long long x, num = 100, h = 0;
  cin >> x;
  while (x > num) {
    num += num / 100;
    h++;
  }
  cout << h << endl;
}


Error: TLE

Fixed submission:

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

int main() {
  int x, num = 100, h = 0;
  cin >> x;
  while (x > num) {
    num += num / 100;
    h++;
  }
  cout << h << endl;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;

int main() {
  int64_t kane = 100;
  int64_t x;
  cin >> x;
  int year = 0;
  while (kane < x) {
    year++;
    kane += kane / 100;
  }
  cout << year << endl;
}


Error: TLE

Fixed submission:

#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;

int main() {
  int64_t kane = 100;
  int64_t x;
  cin >> x;
  int year = 0;
  while (kane < x) {
    year++;
    kane *= 1.01;
    kane = (int)kane;
  }
  cout << year << endl;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

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

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

Error: TLE

Fixed submission:

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

int main() {
  int S = 100, C = 0;
  int X;
  cin >> X;
  while (S < X) {
    S = S * 101 / 100;
    C++;
  }
  cout << C << endl;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <bits/stdc++.h>
using namespace std;
long long x;
int main() {
  cin >> x;
  long long nw = 100;
  double rate = 1.01;
  int ans = 0;
  while (nw < x) {
    nw = (double)(nw)*rate;
    ans++;
  }
  cout << ans << endl;
  return 0;
}

Error: TLE

Fixed submission:

#include <bits/stdc++.h>
using namespace std;
double x;
int main() {
  cin >> x;
  int nw = 100;
  double rate = 1.01;
  int ans = 0;
  while (nw < x) {
    nw = (double)(nw)*rate;
    ans++;
  }
  cout << ans << endl;
  return 0;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

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

int main() {
  long X, M, C;
  M = 100;
  C = 0;

  cin >> X;

  for (;;) {
    M += M / 100;
    C++;
    if (X <= M) {
      cout << C;
      break;
    }
  }
}


Error: TLE

Fixed submission:

#include <iostream>
using namespace std;

int main() {

  double X, z;
  z = 1.01;
  cin >> X;
  int ans = 0;
  int M = 100;

  for (;;) {

    if (M >= X) {
      cout << ans;
      break;
    }

    M = M * z;
    ans++;
  }
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x, i = 100, tt = 0;
  cin >> x;
  while (i < x) {
    i += i / 100;
    tt++;
  }
  cout << tt;
  return 0;
}

Error: TLE

Fixed submission:

#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x, i, tt = 0;
  cin >> x;
  while (i < x) {
    i += i / 100;
    tt++;
  }
  cout << tt;
  return 0;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>

#define FAST_IO                                                                \\
  ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr)
#define int long long
using namespace std;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<pair<int, int>> vii;
const int N = 1e5 + 2;
const int INF = 1e9 + 5;
const int MOD = 1e9 + 7;

int32_t main() {
  FAST_IO;
  int x;
  cin >> x;
  int si = 0, p = 100;
  int amount = p;
  int ans = 0;
  while (amount < x) {
    si = amount / 100;
    amount += si;
    ans++;
  }
  cout << ans;
  return 0;
}

Error: TLE

Fixed submission:

#include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>

#define FAST_IO                                                                \\
  ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr)
// #define int long long
using namespace std;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<pair<int, int>> vii;
const int N = 1e5 + 2;
const int INF = 1e9 + 5;
const int MOD = 1e9 + 7;

int32_t main() {
  FAST_IO;
  int x;
  cin >> x;
  int si = 0, p = 100;
  int amount = p;
  int ans = 0;
  while (amount < x) {
    si = amount / 100;
    amount += si;
    ans++;
  }
  cout << ans;
  return 0;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
using namespace std;
int main() {
  long long int x;
  cin >> x;
  int c = 0;
  long long int a = 100;
  while (1) {
    c++;
    a = a + a / 100;
    if (a >= x)
      break;
  }
  cout << c << endl;
  return 0;
}


Error: TLE

Fixed submission:

#include <iostream>
using namespace std;
int main() {
  long long int x;
  cin >> x;
  int c = 0;
  int a = 100;
  while (1) {
    c++;
    a = a + a / 100;
    if (a >= x)
      break;
  }
  cout << c << endl;
  return 0;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
using namespace std;
int main() {
  unsigned long long x;
  cin >> x;
  unsigned long long c = 100;
  int i = 0;
  while (1) {
    i++;
    c *= 1.01;
    if (c >= x) {
      cout << i << endl;
      return 0;
    }
  }
  return 0;
}


Error: TLE

Fixed submission:

#include <iostream>
using namespace std;
int main() {
  unsigned long long x;
  cin >> x;
  unsigned long long c = 100;
  int i = 0;
  while (1) {
    i++;
    c *= 0.01;
    if (c >= x) {
      cout << i << endl;
      return 0;
    }
  }
  return 0;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <bits/stdc++.h>

using namespace std;

int main() {

  int64_t x;
  cin >> x;

  int64_t a = 100;

  int cnt = 0;

  while (x > a) {

    a *= 1.01;

    cnt++;
  }

  cout << cnt;
}

Error: TLE

Fixed submission:

#include <bits/stdc++.h>

using namespace std;

int main() {

  long long int x;

  cin >> x;

  long long int y = 100;

  int cnt = 0;
  while (x > y) {

    int d = (y * 1) / 100;

    y += d;

    cnt++;
  }

  cout << cnt;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#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;
}


Error: TLE

Fixed submission:

#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;
}
Problem p02694 (C++) — buggy submission, verdict: 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>;

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

Error: TLE

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>;

  int a = 100;
  int count = 0;
  int x;
  cin >> x;
  while (a < x) {
    count++;
    a *= 1.01;
  }
  cout << count << endl;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#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;
}

Error: TLE

Fixed submission:

#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;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
using namespace std;
int main() {
  long long n, sum = 100, years;
  cin >> n;
  years = 0;
  while (sum < n) {
    years++;
    sum += (sum / 100);
  }
  cout << years;
  return 0;
}

Error: TLE

Fixed submission:

#include <iostream>
using namespace std;
int main() {
  int n, sum = 100, year = 0;
  cin >> n;
  while (sum < n) {
    year++;
    sum += (sum / 100);
  }
  cout << year;
  return 0;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

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

int main() {
  int64_t X;
  cin >> X;
  int cnt = 0;
  int64_t a = 100;
  while (a < X) {
    cnt++;
    a *= 1.01;
  }
  cout << cnt << endl;
}

Error: TLE

Fixed submission:

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

int main() {
  int X;
  cin >> X;
  int cnt = 0;
  int a = 100;
  while (a < X) {
    cnt++;
    a *= 1.01;
  }
  cout << cnt << endl;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

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

#define int long long

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

  int x;
  cin >> x;

  int i = 0, y = 100;
  while (y < x) {
    y = y * 1.01;
    ++i;
  }
  cout << i;
}


Error: TLE

Fixed submission:

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

#define int long long

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

  int x;
  cin >> x;

  int i, y = 100;
  for (i = 0;; ++i) {
    y = y * 101 / 100;
    if (y >= x)
      break;
  }
  cout << i + 1;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

//---------------------------------------------------------------
#include <bits/stdc++.h>
using namespace std;
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <numeric>
#include <sstream>
#include <vector>
//---------------------------------------------------------------
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define SIZE 100005
#define INF 1000000000000000LL
#define all(x) x.begin(), x.end()
using pint = pair<int, int>;
using vec = vector<int>;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
//---------------------------------------------------------------
template <class T> inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T> inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
//---------------------------------------------------------------

// ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

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

  ll x;
  cin >> x;
  ll num = 100;
  ll cnt = 0;

  while (num < x) {
    num = num + num / 100;
    cnt++;
  }

  cout << cnt << endl;
}

Error: TLE

Fixed submission:

//---------------------------------------------------------------
#include <bits/stdc++.h>
using namespace std;
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <numeric>
#include <sstream>
#include <vector>
//---------------------------------------------------------------
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define SIZE 100005
#define INF 1000000000000000LL
#define all(x) x.begin(), x.end()
using pint = pair<int, int>;
using vec = vector<int>;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
//---------------------------------------------------------------
template <class T> inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T> inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
//---------------------------------------------------------------

// ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

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

  ll x;
  cin >> x;
  ll num = 100;
  ll cnt = 0;

  while (num != x) {
    num = num + num / 100;
    cnt++;
    if (num == x) {
      cout << cnt << endl;
      return 0;
    }
  }
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

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

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


Error: TLE

Fixed submission:

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

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