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

// #pragma GCC target("avx2")
#pragma GCC optimize("O3", "unroll-loops")

// #include <bits/extc++.h>
// using namespace __gnu_pbds;

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

#define int long long
#define double long double
// template <typename T>
// using pbds_set = tree<T, null_type, less<T>, rb_tree_tag,
// tree_order_statistics_node_update>;
using pii = pair<int, int>;
template <typename T> using prior = priority_queue<T, vector<T>, greater<T>>;
template <typename T> using Prior = priority_queue<T>;

#define X first
#define Y second
#define ALL(x) (x).begin(), (x).end()
#define eb emplace_back
#define pb push_back

#define fastIO()                                                               \\
  ios_base::sync_with_stdio(false);                                            \\
  cin.tie(0);                                                                  \\
  cout.tie(0)
#define RANDOM()                                                               \\
  random_device __rd;                                                          \\
  mt19937 __gen = mt19937(__rd());                                             \\
  uniform_int_distribution<int> __dis(0, 1);                                   \\
  auto rnd = bind(__dis, __gen);

const int INF = 1E18;
const int mod = 1E9 + 7;

int32_t main() {
  fastIO();

  int x, m = 100, ans = 0;
  cin >> x;

  while (m < x and ++ans)
    m += m / 100;

  cout << ans << "\\n";

  return 0;
}

Error: TLE

Fixed submission:

// #pragma GCC target("avx2")
#pragma GCC optimize("O3", "unroll-loops")

// #include <bits/extc++.h>
// using namespace __gnu_pbds;

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

// #define int long long
#define double long double
// template <typename T>
// using pbds_set = tree<T, null_type, less<T>, rb_tree_tag,
// tree_order_statistics_node_update>;
using pii = pair<int, int>;
template <typename T> using prior = priority_queue<T, vector<T>, greater<T>>;
template <typename T> using Prior = priority_queue<T>;

#define X first
#define Y second
#define ALL(x) (x).begin(), (x).end()
#define eb emplace_back
#define pb push_back

#define fastIO()                                                               \\
  ios_base::sync_with_stdio(false);                                            \\
  cin.tie(0);                                                                  \\
  cout.tie(0)
#define RANDOM()                                                               \\
  random_device __rd;                                                          \\
  mt19937 __gen = mt19937(__rd());                                             \\
  uniform_int_distribution<int> __dis(0, 1);                                   \\
  auto rnd = bind(__dis, __gen);

const int INF = 1E18;
const int mod = 1E9 + 7;

int32_t main() {
  fastIO();

  int x, m = 100, ans = 0;
  cin >> x;

  while (m < x and ++ans)
    m += m / 100;

  cout << ans << "\\n";

  return 0;
}
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 a = 100;
  for (int i = 0;; i++) {
    a = a * 1.01;
    if (a >= X) {
      printf("%d\\n", i + 1);
      return 0;
    }
  }
}

Error: TLE

Fixed submission:

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

int X;

int main() {
  cin >> X;
  int a = 100;
  for (int i = 0;; i++) {
    a = a * 1.01;
    if (a >= X) {
      printf("%d", i + 1);
      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 money = 100;

  int cnt = 0;
  while (money < x) {
    money += money / 100;
    cnt++;
  }

  cout << cnt << endl;
}


Error: TLE

Fixed submission:

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

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

  int money = 100;

  int cnt = 0;
  while (true) {
    if (money >= x) {
      break;
    }
    money = money + money * 0.01;
    cnt++;
  }

  cout << cnt << 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 Y = 100;
  int cou = 0;
  while (Y < X) {
    Y += Y / 100;
    cou++;
  }
  cout << cou << endl;
}

Error: TLE

Fixed submission:

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

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

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

Error: TLE

Fixed submission:

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

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

#define rep(i, n) for (ll i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
#define vec vector

/*  <<bit全探索>>

    for (int tmp = 0; tmp < (1 << ビット数); tmp++) {
        bitset<ビット数> s(tmp);
    }
*/

/*　<<stringで読み込んだ数列を一桁ずつint型へ変換>>

    string str;
    int N[桁数];

    cin >> str;

    for (int i = 0; i < 桁数; ++i) {

        N[i] = (int)(str[i] - '0');  //str[i]　はchar型なのでchar→intへ変換

        //cout << N[i] << endl;  //確認のため表示
    }
*/

typedef long long ll;

///////////////////////////////////////////////////////////////////////////

int main() {

  ll X, M = 100, YEAR = 0;
  cin >> X;

  while (M < X) {
    M = M + (M / 100);
    YEAR++;
  }
  cout << YEAR << endl;
}

Error: TLE

Fixed submission:

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

#define rep(i, n) for (ll i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
#define vec vector

/*  <<bit全探索>>

    for (int tmp = 0; tmp < (1 << ビット数); tmp++) {
        bitset<ビット数> s(tmp);
    }
*/

/*　<<stringで読み込んだ数列を一桁ずつint型へ変換>>

    string str;
    int N[桁数];

    cin >> str;

    for (int i = 0; i < 桁数; ++i) {

        N[i] = (int)(str[i] - '0');  //str[i]　はchar型なのでchar→intへ変換

        //cout << N[i] << endl;  //確認のため表示
    }
*/

typedef long long ll;

///////////////////////////////////////////////////////////////////////////

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

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

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

  cout << year << endl;
}


Error: TLE

Fixed submission:

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

int main() {
  int year = 0;
  ll money = 100;
  ll X;
  cin >> X;
  while (money < X) {
    money = (101 * money) / 100;
    year++;
  }

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

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

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

  cout << year << endl;
}

Error: TLE

Fixed submission:

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

int main() {
  int X;
  cin >> X;
  int i = 0;
  int money = 100;
  while (money < X) {
    money = (101 * money) / 100;
    i++;
  }

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

#include <bits/stdc++.h>
using namespace std;
using lint = long long int;
#define FOR(i, begin, end)                                                     \\
  for (int i = (begin), i##_end_ = (end); i < i##_end_; i++)
#define IFOR(i, begin, end)                                                    \\
  for (int i = (end)-1, i##_begin_ = (begin); i >= i##_begin_; i--)
#define REP(i, n) FOR(i, 0, n)
#define IREP(i, n) IFOR(i, 0, n)
constexpr int MOD = 1000000007;
constexpr int INF = 2147483647;
void yes(bool expr) { cout << (expr ? "Yes" : "No") << "\\n"; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  lint X;
  cin >> X;
  lint now = 100;
  int idx = 1;
  while (true) {
    now = now * 1.01;
    if (now >= X) {
      cout << idx << endl;
      return 0;
    }
    idx++;
  }
}

Error: TLE

Fixed submission:

#include <bits/stdc++.h>
using namespace std;
using lint = long long int;
#define FOR(i, begin, end)                                                     \\
  for (int i = (begin), i##_end_ = (end); i < i##_end_; i++)
#define IFOR(i, begin, end)                                                    \\
  for (int i = (end)-1, i##_begin_ = (begin); i >= i##_begin_; i--)
#define REP(i, n) FOR(i, 0, n)
#define IREP(i, n) IFOR(i, 0, n)
constexpr int MOD = 1000000007;
constexpr int INF = 2147483647;
void yes(bool expr) { cout << (expr ? "Yes" : "No") << "\\n"; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  lint X;
  cin >> X;
  lint now = 100;
  int idx = 1;
  while (true) {
    now = now * 101 / 100;
    if (now >= X) {
      cout << idx << endl;
      return 0;
    }
    idx++;
  }
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <cmath>
#include <iostream>
#include <limits>
using namespace std;

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

Error: TLE

Fixed submission:

#include <iostream>
using namespace std;

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

#include <algorithm>
#include <bitset>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
using ll = long long;
using ld = long double;
using pint = pair<int, int>;
using pll = pair<ll, ll>;
#define LONG_INF 9223372036854775807
#define INF 1000000000LL
#define EPS 1e-10
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define dump(a)                                                                \\
  rep(d, a.size()) {                                                           \\
    cout << a[d];                                                              \\
    if (d != a.size() - 1)                                                     \\
      cout << " ";                                                             \\
    else                                                                       \\
      cout << endl;                                                            \\
  }
#define all(v) v.begin(), v.end()
#define pb push_back

#define INT 1.01

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

  int64_t X;
  cin >> X;

  int64_t v = 100;
  // while(true){
  rep(ret, INF) {
    if (X <= v) {
      cout << ret << endl;
      break;
    }
    // v *= INT;
    v += 0.01 * v;
  }

  // cout << ret << endl;

  return 0;
}


Error: TLE

Fixed submission:

#include <algorithm>
#include <bitset>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
using ll = long long;
using ld = long double;
using pint = pair<int, int>;
using pll = pair<ll, ll>;
#define LONG_INF 9223372036854775807
#define INF 1000000000LL
#define EPS 1e-10
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define dump(a)                                                                \\
  rep(d, a.size()) {                                                           \\
    cout << a[d];                                                              \\
    if (d != a.size() - 1)                                                     \\
      cout << " ";                                                             \\
    else                                                                       \\
      cout << endl;                                                            \\
  }
#define all(v) v.begin(), v.end()
#define pb push_back

#define INT 1.01

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

  ll X;
  cin >> X;

  int v = 100;
  // while(true){
  rep(ret, INF) {
    if (X <= v) {
      cout << ret << endl;
      break;
    }
    // v *= INT;
    v += 0.01 * v;
  }

  // cout << ret << endl;

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

#include <bits/stdc++.h>

using namespace std;

int main() {

  long long X = 0;

  cin >> X;

  long long P = 100, year = 0;

  while (P < X) {

    P += P / 100;

    year++;
  }

  cout << year << endl;
}

Error: TLE

Fixed submission:

#include <bits/stdc++.h>

using namespace std;

int main() {

  int X = 0;

  cin >> X;

  int money = 100, count = 0;

  while (money < X) {

    money += money / 100;

    count++;
  }

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

#include <iostream>
using namespace std;

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


Error: TLE

Fixed submission:

#include <iostream>
using namespace std;

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

#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;

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

  return 0;
}


Error: TLE

Fixed submission:

#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;

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

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

#include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
int main() {
  long long x;
  cin >> x;
  long long i = 100;
  int ans = 0;
  while (i < x) {
    i += i / 100;
    ans++;
  }
  cout << ans << endl;
  return 0;
}

Error: TLE

Fixed submission:

#include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
int main() {
  int x;
  cin >> x;
  int i = 100;
  int ans = 0;
  while (i < x) {
    i += i / 100;
    ans++;
  }
  cout << ans << endl;
  return 0;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <algorithm>
#include <bitset>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
using ll = long long;
using ld = long double;
using pint = pair<int, int>;
using pll = pair<ll, ll>;
#define LONG_INF 9223372036854775807
#define INF 1000000000LL
#define EPS 1e-10
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define dump(a)                                                                \\
  rep(d, a.size()) {                                                           \\
    cout << a[d];                                                              \\
    if (d != a.size() - 1)                                                     \\
      cout << " ";                                                             \\
    else                                                                       \\
      cout << endl;                                                            \\
  }
#define all(v) v.begin(), v.end()
#define pb push_back

#define INT 1.01

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

  int64_t X;
  cin >> X;

  int64_t ret = 0, v = 100;
  while (true) {
    ret++;
    v *= INT;
    if (X <= v)
      break;
  }

  cout << ret << endl;

  return 0;
}


Error: TLE

Fixed submission:

#include <algorithm>
#include <bitset>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
using ll = long long;
using ld = long double;
using pint = pair<int, int>;
using pll = pair<ll, ll>;
#define LONG_INF 9223372036854775807
#define INF 1000000000LL
#define EPS 1e-10
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define dump(a)                                                                \\
  rep(d, a.size()) {                                                           \\
    cout << a[d];                                                              \\
    if (d != a.size() - 1)                                                     \\
      cout << " ";                                                             \\
    else                                                                       \\
      cout << endl;                                                            \\
  }
#define all(v) v.begin(), v.end()
#define pb push_back

#define INT 1.01

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

  ll X;
  cin >> X;

  int ret = 0, v = 100;
  while (true) {
    ret++;
    v *= INT;
    if (X <= v)
      break;
  }

  cout << ret << endl;

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

#include <iostream>
using namespace std;

int main() {
  long long X;
  cin >> X;
  long long n = 1;
  long long rec = 101;
  while (rec < X) {
    rec = rec * 1.01;
    n++;
  }
  cout << n << endl;
  system("pause");
  return 0;
}

Error: TLE

Fixed submission:

#include <iostream>
using namespace std;

int main() {
  long long X;
  cin >> X;
  long long n = 1;
  long long rec = 101;
  while (1) {
    if (rec >= X)
      break;
    rec = rec * 101 / 100;
    n++;
  }
  cout << n << endl;
  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 money = 100, ans = 0;
  while (money < X) {
    money += money / 100;
    ans++;
  }
  cout << ans << endl;
}


Error: TLE

Fixed submission:

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

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

#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define puts(i) cout << i << endl
#define INF INT_MAX;
#define INFL LLONG_MAX;
typedef long long ll;
using namespace std;

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

  ll money = 100;
  ll ans = 0;
  while (true) {
    money *= 1.01;
    ans++;
    if (money >= x)
      break;
  }

  cout << ans << endl;
}

Error: TLE

Fixed submission:

#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define puts(i) cout << i << endl
#define INF INT_MAX;
#define INFL LLONG_MAX;
typedef long long ll;
using namespace std;

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

  int money = 100;
  int ans = 0;
  while (true) {
    money *= 1.01;
    ans++;
    if (money >= x)
      break;
  }

  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;

  double i = 100;

  int ans = 0;

  while (i < X) {
    i = floor(i * 1.01);
    ans++;
  }

  cout << ans << endl;

  return 0;
}

Error: TLE

Fixed submission:

#include <bits/stdc++.h>

using namespace std;

int main() {

  long long X;
  cin >> X;

  long long i = 100;

  long long ans = 0;

  while (i < X) {
    i = i * 1.005;
    ans++;
  }

  cout << ans << endl;

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

#include <bits/stdc++.h>

using namespace std;

int main() {

  /*#ifndef ONLINE_JUDGE
          freopen("input.txt", "r", stdin);
          freopen("output.txt", "w", stdout);
  #endif*/

  long long n;
  cin >> n;

  long long cnt = 100;
  int ans = 0;

  while (cnt < n) {

    cnt = cnt * 1.01;
    ans++;
  }

  cout << ans;
}


Error: TLE

Fixed submission:

#include <bits/stdc++.h>

using namespace std;

int main() {

  /*#ifndef ONLINE_JUDGE
          freopen("input.txt", "r", stdin);
          freopen("output.txt", "w", stdout);
  #endif*/

  long long int n;
  cin >> n;

  int cnt = 100;
  int ans = 0;

  while (true) {
    if (cnt >= n)
      break;

    cnt += cnt / 100;
    ans++;
  }

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

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

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

  int ans = 0;
  int64_t price = 100;
  for (int i = 0; i <= X; i++) {
    if (X <= price)
      break;
    price *= 1.01;
    ans++;
  }
  cout << ans << endl;
}


Error: TLE

Fixed submission:

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

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

  int ans = 0;
  int price = 100;
  for (int i = 0; i < X; i++) {
    if (X <= price)
      break;
    price *= 1.01;
    ans++;
  }
  cout << ans << endl;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

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

int main() {
  long long x;
  cin >> x;
  long long yokin = 100;
  int count = 0;
  long long w;
  while (yokin < x) {
    w = yokin / 100;
    yokin += w;
    count++;
  }
  cout << count << endl;
}

Error: TLE

Fixed submission:

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

int main() {
  int x;
  cin >> x;
  int yokin = 100;
  int count = 0;
  while (yokin < x) {
    yokin += yokin / 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 x, y = 100, i = 0;
  cin >> x;
  while (y < x) {
    y += y / 100;
    i++;
  }
  cout << i;
}


Error: TLE

Fixed submission:

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

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

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

Error: TLE

Fixed submission:

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

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

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

int main() {
  long X;
  cin >> X;
  int flag = 0;
  long val = 100;
  int ctr = 0;
  while (flag == 0) {
    ctr++;
    val = val * 1.01;
    if (val >= X) {
      flag = 1;
      break;
    }
  }
  cout << ctr << endl;
  return 0;
}

Error: TLE

Fixed submission:

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

int main() {
  int X;
  cin >> X;
  int flag = 0;
  int val = 100;
  int ctr = 0;
  while (flag == 0) {
    ctr++;
    val = val * 1.01;
    if (val >= X) {
      flag = 1;
      break;
    }
  }
  cout << ctr << endl;
  return 0;
}