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

#include <algorithm>
#include <iostream>
#include <math.h>
#include <set>
#include <string>
using namespace std;

int main() {

  long X;
  long M = 100;
  cin >> X;

  for (int year = 1; M <= X; year++) {
    M *= 1.01;
    // cout << year << " " << M << " " << X << endl;
    if (M >= X) {
      cout << year << endl;
      break;
    }
  }

  return 0;
}


Error: TLE

Fixed submission:

#include <algorithm>
#include <iostream>
#include <math.h>
#include <set>
#include <string>
using namespace std;

int main() {

  int X;
  int M = 100;
  cin >> X;

  for (int year = 1; M <= X; year++) {
    M *= 1.01;
    // cout << year << " " << M << " " << X << endl;
    if (M >= X) {
      cout << year << endl;
      break;
    }
  }

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

#include <iostream>

using namespace std;

// Using while loop to solve this time

int main(int argc, char const *argv[]) {
  long long base = 100;
  // Other people don't include this interest variable
  float interest = 0.01;
  long long years = 0;

  long long target; // 103
  cin >> target;

  // How many years it take to get to or above target;

  while (true) {
    if (base >= target) {
      cout << years << "\\n";
      return 0;
    }
    base += base / 100;
    ++years;
  }
  return 0;
}


Error: TLE

Fixed submission:

#include <iostream>

using namespace std;

// All is correct except for one test case

int main(int argc, char const *argv[]) {
  int base = 100;
  // Other people don't include this interest variable
  float interest = 0.01;
  int years = 1;

  int target; // 103
  cin >> target;

  // How many years it take to get to or above target;

  for (int i = base; i <= target; ++years) {
    base = (base * interest) + base;
    if (base >= target) {
      cout << years << "\\n";
      return 0;
    }
  }

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

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

int main() {
  long long n = 100, x, m = 0;
  cin >> x;
  while (n < x) {
    n += n / 100;
    m++;
  }
  cout << m;
  return 0;
}

Error: TLE

Fixed submission:

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

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

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
int main() {
  int64_t a = 100, x, cnt = 0;
  cin >> x;
  while (a < x) {
    a += a * 0.01;
    cnt++;
  }
  cout << cnt;
}


Error: TLE

Fixed submission:

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
int main() {
  int a = 100, x, cnt = 0;
  cin >> x;
  while (a < x) {
    a += a * 0.01;
    cnt++;
  }
  cout << cnt;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

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


Error: TLE

Fixed submission:

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

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

int main() {
  double X;
  int64_t Y = 100;
  cin >> X;
  int year = 0;
  while (Y < X) {
    Y *= 1.01;
    year++;
  }
  cout << year;
}

Error: TLE

Fixed submission:

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

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

#include <iostream>
using namespace std;

int main() {

  long long X, money, count;
  money = 100;
  count = 0;
  cin >> X;

  while (money < X) {
    money *= 1.01;
    count++;
  }
  cout << count << endl;
}

Error: TLE

Fixed submission:

#include <iostream>
using namespace std;

int main() {

  int X, money, count;
  money = 100;
  count = 0;
  cin >> X;

  while (true) {
    if (money >= X)
      break;
    else {
      money *= 1.01;
      count++;
    }
  }
  cout << count << endl;
}
Problem p02694 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
using namespace std;
#define int long long
int func(int a, int b, int cnt) {
  if (a >= b) {
    return cnt;
  }
  return func(a + a * 0.01, b, cnt + 1);
}
signed main() {
  int x;
  cin >> x;
  cout << func(100, x, 0) << endl;
}

Error: 0

Fixed submission:

#include <bits/stdc++.h>
using namespace std;
#define int long long
int func(int a, int b, int cnt) {
  if (a >= b) {
    return cnt;
  }
  func(a + a * 0.01, b, cnt + 1);
}
signed main() {
  int x;
  cin >> x;
  cout << func(100, x, 0) << endl;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <bits/stdc++.h>
#define MOD 1000000007
#define mp make_pair
#define ll long long
#define pb push_back
#define faster                                                                 \\
  ios_base::sync_with_stdio(0);                                                \\
  cin.tie(0);                                                                  \\
  cout.tie(0);
#define debug cout << "Debugging.." << endl
using namespace std;
int main() {
  faster;

  ll int x;
  cin >> x;
  ll int p = 100, c = 0;
  while (p < x) {
    p += p / 100;
    c++;
  }
  cout << c;
}


Error: TLE

Fixed submission:

#include <bits/stdc++.h>
#define MOD 1000000007
#define mp make_pair
#define ll long long
#define pb push_back
#define faster                                                                 \\
  ios_base::sync_with_stdio(0);                                                \\
  cin.tie(0);                                                                  \\
  cout.tie(0);
#define debug cout << "Debugging.." << endl
using namespace std;
int main() {
  faster;

  ll int x;
  cin >> x;
  ll int p = 0, c = 0;
  while (p < x) {
    p += p / 100;
    c++;
  }
  cout << c;
}
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 <iostream>
using namespace std;

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

#include <iostream>
#include <stdint.h>

int main(void) {
  int64_t x, count = 0;
  std::cin >> x;

  for (int64_t i = 100; i < x; i += i * 0.01) {
    ++count;
  }
  std::cout << count << "\\n";
}

Error: TLE

Fixed submission:

#include <iostream>

int main(void) {
  int x, base = 100;
  int count = 0;
  std::cin >> x;

  for (count = 0; base < x; ++count) {
    base += base * 1 / 100;
  }

  std::cout << count << "\\n";
  return 0;
}
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 Y = 100;
  int i = 0;
  while (X > Y) {
    Y += Y / 100;
    i++;
  }
  cout << i << endl;
}


Error: TLE

Fixed submission:

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

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

#include <bits/stdc++.h>

#define ll long long
#define fi first
#define se second
#define mp make_pair

#define fastio()                                                               \\
  ios_base::sync_with_stdio(false);                                            \\
  cin.tie(NULL);
#define endl "\\n"

using namespace std;

ll x;
void solve() {
  double per = (double)1.01;
  ll cur = 100;
  int year = 0;
  while (cur < x) {
    cur = cur * per;
    year += 1;
  }
  cout << year << endl;
}

int main() {

  fastio();

  cin >> x;

  solve();

  return 0;
}

Error: TLE

Fixed submission:

#include <bits/stdc++.h>

#define ll long long
#define fi first
#define se second
#define mp make_pair

#define fastio()                                                               \\
  ios_base::sync_with_stdio(false);                                            \\
  cin.tie(NULL);
#define endl "\\n"

using namespace std;

void solve() {}

int main() {

  fastio();

  ll x;
  cin >> x;

  int cur = 100;
  if (x == 100) {
    cout << "0\\n";
  } else {
    for (int i = 0;; i++) {
      cur = cur * (double)(1.01);
      if (cur >= x) {
        cout << i + 1 << endl;
        break;
      }
    }
  }

  return 0;
}
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 n = 0, money = 100;
  while (money < X) {
    money += money / 100;
    n += 1;
  }
  cout << n << endl;
}

Error: TLE

Fixed submission:

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

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

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

Error: TLE

Fixed submission:

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

#include <algorithm>
#include <iostream>
#include <string>
using namespace std;

int main() {
  long long x;
  cin >> x;
  bool ok = true;
  long long money = 100;
  int ans = 0;
  while (ok) {
    ans += 1;
    money += money / 100;
    if (money >= x) {
      ok = false;
    }
  }
  cout << ans << endl;
}

Error: TLE

Fixed submission:

#include <algorithm>
#include <iostream>
#include <string>
using namespace std;

int main() {
  int x;
  cin >> x;
  bool ok = true;
  int money = 100;
  int ans = 0;
  while (ok) {
    ans += 1;
    money *= 1.01;
    if (money >= x) {
      ok = false;
    }
  }
  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 sum = 100;
  int counter = 0;
  while (true) {
    if (sum >= X) {
      break;
    }
    sum += sum / 100;
    counter++;
  }
  cout << counter << endl;
}

Error: TLE

Fixed submission:

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

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

  int sum = 100;
  int counter = 0;
  if (X <= 2100000000) {
    while (true) {
      if (sum >= X) {
        break;
      }
      sum += sum / 100;
      counter++;
    }
  } else {
    sum = 2111257322;
    counter = 1752;
    while (true) {
      if (sum >= X) {
        break;
      }
      sum += sum / 100;
      counter++;
    }
  }

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

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

int main() {
  long long c = 100;
  long long x;
  cin >> x;

  long long count = 0;

  for (long long i = 0; i < 1000000000000000000; i++) {
    count++;
    c += c / 100;
    if (c >= x)
      break;
  }
  cout << count << endl;
}


Error: TLE

Fixed submission:

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

int main() {
  long long c = 100;
  long long x;
  cin >> x;

  long long count = 0;

  for (long long i = 0; i < 1000000000000000000; i++) {
    count++;
    c /= c / 100;
    if (c >= x)
      break;
  }
  cout << count << endl;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
#include <stdio.h>

int main() {
  long long X;
  long long kane = 100;
  double k;
  int nen = 0;

  scanf("%lld", &X);

  while (kane < X) {
    kane = kane * 1.01;
    // kane = (double)(int)k;
    nen++;
    //		printf("%lf\\n", kane);
  }

  printf("%d", nen);

  return 0;
}

Error: TLE

Fixed submission:

#include <stdio.h>

int main() {
  double X;
  double kane = 100;
  double k;
  int nen = 0;

  scanf("%lf", &X);

  while (kane < X) {
    k = kane * 1.01;
    kane = (double)(int)k;
    nen++;
    //		printf("%lf\\n", kane);
  }

  printf("%d", nen);

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

#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <bitset>    // bitset
#include <cctype>    // isupper, islower, isdigit, toupper, tolower
#include <climits>
#include <cstdint> // int64_t, int*_t
#include <cstdio>  // printf
#include <deque>   // deque
#include <functional>
#include <iomanip> //setprecision
#include <iostream>
#include <map> // map
#include <math.h>
#include <queue>         // queue, priority_queue
#include <set>           // set
#include <stack>         // stack
#include <string>        // string, to_string, stoi
#include <tuple>         // tuple, make_tuple
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <utility>       // pair, make_pair
#include <vector>        // vector
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
int main() {
  long long int a, b = 100, c = 0;
  cin >> a;
  while (b <= a) {
    b *= 1.01;
    c++;
    if (b >= a)
      break;
  }
  cout << c;
}


Error: TLE

Fixed submission:

#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <bitset>    // bitset
#include <cctype>    // isupper, islower, isdigit, toupper, tolower
#include <climits>
#include <cstdint> // int64_t, int*_t
#include <cstdio>  // printf
#include <deque>   // deque
#include <functional>
#include <iomanip> //setprecision
#include <iostream>
#include <map> // map
#include <math.h>
#include <queue>         // queue, priority_queue
#include <set>           // set
#include <stack>         // stack
#include <string>        // string, to_string, stoi
#include <tuple>         // tuple, make_tuple
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <utility>       // pair, make_pair
#include <vector>        // vector
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
int main() {
  int a, b = 100, c = 0;
  cin >> a;
  while (b < a) {
    b += b / 100;
    c++;
  }
  cout << c;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

// #pragma GCC optimize("Ofast")

#pragma GCC optimize("O3")
// #pragma GCC target("avx,avx2,fma")
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
constexpr auto INF = 9223372036854775807;
typedef long long int ll;
typedef unsigned long long int ull;
typedef unsigned long int ul;
#define f(i, a, b) for (ll i = (ll)a; i < (ll)b; i += 1)
#define rf(i, a, b) for (ll i = (ll)a; i >= (ll)b; i -= 1)
#define endl '\\n'
#define N 1000000007 // prime modulo value
#define C 1000000001
#define M 998244353
#define all(x) x.begin(), x.end()
using namespace std;
// From Geeksforgeeks
inline ll gcd(ll a, ll b) {
  if (b == 0)
    return a;
  return gcd(b, a % b);
}
// Power function took from geeksforgeeks
ll power(ll x, ll y) {
  ll res = 1;

  x = x;
  if (x == 0)
    return 0;
  while (y > 0) {
    if (y & 1)
      res = (res * x);
    y = y >> 1;
    x = (x * x);
  }
  return res;
}
double dist(ll x1, ll y1, ll x2, ll y2) {
  double ans = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ll x, a = 0;
  cin >> x;
  ll ans = 100, count = 0;
  while (1) {
    if (ans >= x)
      break;
    ans += (ans / 100);
    count += 1;
  }
  cout << count;
  return 0;
}

Error: TLE

Fixed submission:

// #pragma GCC optimize("Ofast")

#pragma GCC optimize("O3")
// #pragma GCC target("avx,avx2,fma")
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
constexpr auto INF = 9223372036854775807;
typedef long long int ll;
typedef unsigned long long int ull;
typedef unsigned long int ul;
#define f(i, a, b) for (ll i = (ll)a; i < (ll)b; i += 1)
#define rf(i, a, b) for (ll i = (ll)a; i >= (ll)b; i -= 1)
#define endl '\\n'
#define N 1000000007 // prime modulo value
#define C 1000000001
#define M 998244353
#define all(x) x.begin(), x.end()
using namespace std;
// From Geeksforgeeks
inline ll gcd(ll a, ll b) {
  if (b == 0)
    return a;
  return gcd(b, a % b);
}
// Power function took from geeksforgeeks
ll power(ll x, ll y) {
  ll res = 1;

  x = x;
  if (x == 0)
    return 0;
  while (y > 0) {
    if (y & 1)
      res = (res * x);
    y = y >> 1;
    x = (x * x);
  }
  return res;
}
double dist(ll x1, ll y1, ll x2, ll y2) {
  double ans = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ll x, a = 0;
  cin >> x;
  ll ans = 100, count = 0;
  while (ans != x) {
    ans += (ans / 100);
    count += 1;
  }
  cout << count;
  return 0;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

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

int main() {
  long long a;
  cin >> a;
  long long b = 100, count = 0;
  while (b < a) {
    b += b / 100; /*decline loop*/
    count++;
  }
  cout << count << endl;
}


Error: TLE

Fixed submission:

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

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

#include <iostream>
#include <string>
#include <vector>

using namespace std;
int main() {
  unsigned long long int x;
  cin >> x;
  int i = 1;
  unsigned long long int a = 101;
  for (; a < x; i++) {
    a = 1.01 * a;
  }
  cout << i << endl;

  return 0;
}

Error: TLE

Fixed submission:

#include <iostream>
#include <string>
#include <vector>

using namespace std;
int main() {
  int x;
  cin >> x;
  int i = 1;
  int a = 101;
  for (; a < x; i++) {
    a *= 1.01;
  }
  cout << i << endl;

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

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

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


Error: TLE

Fixed submission:

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

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

#include <iostream>
using namespace std;
long long x, t = 100, d;
int main() {
  cin >> x;
  while (t < x) {
    t += t / 100;
    d++;
  }
  cout << d;
}

Error: TLE

Fixed submission:

#include <iostream>

using namespace std;

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

#include <bits/stdc++.h>
#include <vector>3
using namespace std;
void init() {
  cin.tie(0);
  cin.sync_with_stdio(0);
}

int main() {
  init();
  unsigned long long k, a = 100, b = 0;
  cin >> k;
  while (a < k) {
    a = a * .01 + a;
    b++;
    if (a == k) {
      break;
    }
  }
  cout << b;
}


Error: TLE

Fixed submission:

#include <bits/stdc++.h>
#include <vector>3
using namespace std;
void init() {
  cin.tie(0);
  cin.sync_with_stdio(0);
}

int main() {
  init();
  unsigned long long k, a = 100, b = 0;
  cin >> k;
  while (true) {
    a = a * .01 + a;
    b++;
    if (a == k) {
      break;
    }
  }
  cout << b;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

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

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

Error: TLE

Fixed submission:

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

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

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

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

  return 0;
}


Error: TLE

Fixed submission:

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

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

#include <bits/stdc++.h>
#define int long long
#define all(c) (c).begin(), (c).end()
#define pii pair<long long, long long>
#define endl '\\n'

using namespace std;

signed main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  // cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int ans = 0;
    int p = 100;
    while (n > p) {
      p += p / 100;
      // p/=100;
      ans++;
    }
    cout << ans << endl;
    // cout << p;
  }
}

Error: TLE

Fixed submission:

#include <bits/stdc++.h>
#define int long long
#define all(c) (c).begin(), (c).end()
#define pii pair<long long, long long>
#define endl '\\n'

using namespace std;

signed main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  // cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int p = 100;
    int i = 0;
    while (p < n) {
      p *= 101;
      p /= 100;
      i++;
    }
    cout << i;
  }
}
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 <iostream>
using namespace std;
int main(void) {
  int x;
  cin >> x;
  int i = 0;
  int a = 100;
  while (a < x) {
    a = a * 1.01;
    i++;
  }
  cout << i << endl;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

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

using namespace std;

int main() {
  /*int x;
  cin >> x;
  cout << x / 100.0 << endl;
  cout << log10(x / 100.0) << endl;
  cout << log10(1.01) << endl;
  cout << (log10(x / 100.0)) / (log10(1.01));*/
  long long int x;
  long long int total = 100;
  int num = 0;
  cin >> x;
  while (total < x) {
    total = total * 1.01;
    total = floor(total);
    //	cout << total << endl;
    num++;
  }
  cout << num;
  return 0;
}

Error: TLE

Fixed submission:

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

using namespace std;

int main() {
  /*int x;
  cin >> x;
  cout << x / 100.0 << endl;
  cout << log10(x / 100.0) << endl;
  cout << log10(1.01) << endl;
  cout << (log10(x / 100.0)) / (log10(1.01));*/
  long long int x;
  long long int total = 100;
  int num = 0;
  cin >> x;
  while (total != x) {
    total = total * 1.01;
    total = floor(total);
    num++;
  }
  cout << num;
  return 0;
}