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

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

int main() {
  long long X;
  long long a = 0;
  long long b = 100;
  cin >> X;
  while (true) {
    b *= 1.01;
    a++;
    if (b >= X) {
      break;
    }
  }
  cout << a << endl;
}


Error: TLE

Fixed submission:

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

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

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

int main() {
  long long N;
  cin >> N;
  long long now = 100;
  int count = 0;
  while (now < N) {
    now *= 1.01;
    count++;
  }
  cout << count << endl;
}

Error: TLE

Fixed submission:

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

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

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

using namespace std;

int main() {

  long x;
  long money = 100;
  int year = 0;

  cin >> x;
  while (money < x) {
    money *= 1.01;
    year++;
  }

  cout << year << endl;
  return 0;
}

Error: TLE

Fixed submission:

#include <algorithm>
#include <iostream>
#include <map>

using namespace std;

int main() {

  int x;
  int money = 100;
  int year = 0;

  cin >> x;
  while (money < x) {
    money *= 1.01;
    year++;
  }

  cout << year << 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 m = 100;
  long long y = 0;
  while (X > m) {
    m *= 1.01;
    y++;
  }
  cout << y << endl;
}

Error: TLE

Fixed submission:

#include <iostream>
using namespace std;
int main() {
  int X;
  cin >> X;
  int m = 100;
  int y = 0;
  while (X > m) {
    m *= m / 100;
    y++;
  }
  cout << y << endl;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
using namespace std;

unsigned long long x;

int main() {
  cin >> x;
  unsigned long long sum = 100, count = 0;
  while (x > sum) {
    sum *= 1.01;
    count += 1;
  }
  cout << count << endl;
}


Error: TLE

Fixed submission:

#include <iostream>
using namespace std;

int x;

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


#include <algorithm>
#include <cfloat>
#include <cmath>
#include <fstream>
#include <iostream>
#include <numeric>
#include <string>

// #include <bits/stdc++.h>

using namespace std;

#define rep(i, n) for (int i = 0; i < (n); i++)

int main(int argc, const char *argv[]) {

  long long int n;
  cin >> n;

  long long int money = 100;
  int cnt = 0;

  while (money < n) {

    money = money * 1.01;
    cnt++;
  }

  cout << cnt << endl;

  return 0;
}


Error: TLE

Fixed submission:

/*
#include <algorithm>
#include <cfloat>
#include <cmath>
#include <fstream>
#include <iostream>
#include <numeric>
#include <string>
 */
#include <bits/stdc++.h>

using namespace std;

#define rep(i, n) for (int i = 0; i < (n); i++)

int main(int argc, const char *argv[]) {

  int n;
  cin >> n;

  int money = 100;
  int cnt = 0;
  while (money < n) {

    money = money * 1.01;
    cnt++;
  }

  cout << cnt << endl;

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

#include <iostream>
#include <vector>

int main(void) {
  long long start = 100;
  long long x;
  std::cin >> x;
  long long result = 0;
  while (start < x) {
    start += start / 100;
    result++;
  }
  std::cout << result << std::endl;
  return 0;
}

Error: TLE

Fixed submission:

#include <iostream>
#include <vector>

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

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

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

Error: TLE

Fixed submission:

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

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

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

Error: TLE

Fixed submission:

#include <iostream>
using namespace std;
int main() {
  long long a, b;
  cin >> a;
  int c = 100;
  b = 0;
  while (c < a) {
    c = c + c / 100;
    b++;
  }
  cout << b;
  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 P = 100;
  int Y = 0;
  while (P < X) {
    P += P / 100;
    Y++;
  }
  cout << Y << endl;
  return 0;
}


Error: TLE

Fixed submission:

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

int main() {
  long long X;
  cin >> X;
  int P = 100;
  int Y = 0;
  while (P < X) {
    P += P / 100;
    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;
  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() {
  int X;
  cin >> X;
  int P = 100, step = 0;

  while (P < X) {
    P += P / 100;
    step++;
  }

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

#include <iostream>
using namespace std;

int main() {
  long long a;
  cin >> a;
  long long ans = 0;
  long long i = 100;
  for (long long j = 0; j < 1000000; j++) {
    i = i + i / 100;
    ans++;
    if (i >= a)
      break;
  }
  cout << ans;
}

Error: TLE

Fixed submission:

#include <iostream>
using namespace std;

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

#include <iostream>
#include <string>

using std::cin;
using std::cout;
using std::endl;
using std::string;

int main() {
  unsigned long long int i, t, x;
  cin >> x;
  i = 100;
  t = 0;
  while (true) {
    t++;
    i = i / 100 + i;
    if (x <= i) {
      cout << t;
      return 0;
    }
  }
}

Error: TLE

Fixed submission:

#include <iostream>
#include <string>

using std::cin;
using std::cout;
using std::endl;
using std::string;

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

#include <iostream>
using namespace std;

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

  unsigned long sum = 100;
  unsigned long i = 0;

  while (true) {
    sum += long(sum * 0.01);

    i++;
    if (sum >= x) {
      cout << i << endl;
      break;
    }
  }
}

Error: TLE

Fixed submission:

#include <iostream>
using namespace std;

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

  unsigned long sum = 100;
  unsigned long i = 0;

  while (true) {
    sum += int(sum * 0.01);

    i++;
    if (sum >= x) {
      cout << i << endl;
      break;
    }
  }
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

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

using namespace std;

int main() {
  long long x;
  cin >> x;
  long long stock = 100;
  int cnt = 0;
  while (stock < x) {
    stock = floor(stock * 1.01);
    cnt++;
  }
  cout << cnt;
  return 0;
}

Error: TLE

Fixed submission:

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

using namespace std;

int main() {
  long long x;
  cin >> x;
  int stock = 100;
  int cnt = 0;
  while (stock < x) {
    stock += stock * 0.01;
    cnt++;
  }
  cout << cnt;
  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 b = 100;
  int y = 0;

  while (true) {
    b = b / 100 + b;
    y++;
    if (b >= x) {
      cout << y << endl;
      break;
    }
  }
}

Error: TLE

Fixed submission:

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

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

  long long b = 100; // 預金額(bank)
  int y = 0;         // 年数

  while (b < x) {
    b = b * 101 / 100;
    y++;
  }

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

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

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

int main() {
  ll a = 100, x, n = 2;
  cin >> x;
  while (true) {
    a += a / 100;
    if (a >= x) {
      cout << n - 1 << endl;
      break;
    }
    n++;
  }
}

Error: TLE

Fixed submission:

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

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

int main() {
  ll a = 100, x, n = 2;
  cin >> x;
  while (true) {
    a = a * 101 / 100;
    if (a >= x) {
      cout << n - 1 << endl;
      break;
    }
    n++;
  }
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>

using namespace std;

typedef long long LL;
int main() {
  LL x;
  cin >> x;
  LL s = 100;
  for (int i = 1;; i++) {
    s = 1.01 * s;
    if (s >= x) {
      cout << i << endl;
      break;
    }
  }
  return 0;
}


Error: TLE

Fixed submission:

#include <iostream>

using namespace std;

int main() {
  int x;
  cin >> x;
  int s = 100;
  for (int i = 1;; i++) {
    s = 1.01 * s;
    if (s >= x) {
      cout << i << 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 k = 100;
  int ans = 0;
  while (x > k) {
    k = k * 1.01;
    ans++;
  }
  cout << ans << endl;
}


Error: TLE

Fixed submission:

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

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

#include <iostream>
using namespace std;

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

Error: TLE

Fixed submission:

#include <iostream>
using namespace std;

int main() {
  int money = 100, X, year = 0;
  cin >> X;
  if (X == 100) {
    cout << 0 << endl;
  } else {
    while (money < X) {
      int kinri = money / 100;
      money += kinri;
      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 (int i = 0; i < (int)(n); i++)
vector<int> input(int N) {
  vector<int> vec(N);
  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
  }
  return vec;
}

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

Error: TLE

Fixed submission:

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int long long i = 0; i < (int)(n); i++)
vector<int> input(int N) {
  vector<int> vec(N);
  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
  }
  return vec;
}

int main() {
  int long long x, a = 100;
  cin >> x;
  rep(i, 10000000000000000) {
    if (a >= x) {
      cout << i << endl;
      return 0;
    }
    a = a * 101 / 100;
  }
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>
using namespace std;

int main() {
  long long x, dep = 100;
  int ans = 0;
  cin >> x;
  while (dep < x) {
    dep += dep * 0.01;
    ans++;
  }
  cout << ans;
}


Error: TLE

Fixed submission:

#include <iostream>
using namespace std;

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

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define fi first
#define se second
#define pb push_back
template <class T> inline int chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T> inline int chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const int INF = 1 << 29;
const ll LINF = 1LL << 58;

void solve() {
  double x, y;
  cin >> y;
  x = 100;
  int ans = 0;
  while (1) {
    x *= 1.01;
    x = (double)(ll)x;
    ans++;
    if (x >= y) {
      break;
    }
  }
  cout << ans << endl;
  return;
}

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


Error: TLE

Fixed submission:

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define fi first
#define se second
#define pb push_back
template <class T> inline int chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T> inline int chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const int INF = 1 << 29;
const ll LINF = 1LL << 58;

void solve() {
  ll x, y;
  cin >> y;
  x = 100;
  int ans = 0;
  while (1) {
    x *= 101;
    x /= 100;
    ans++;
    if (x >= y) {
      break;
    }
  }
  cout << ans << endl;
  return;
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  solve();
  return 0;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

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

int main() {
  long long int X, N, temp = 100;
  cin >> X;
  for (N = 0; temp < X; N++) {
    temp += temp * 0.01;
  }

  cout << N << endl;
}


Error: TLE

Fixed submission:

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

int main() {
  int X, N, temp = 100;
  cin >> X;
  for (N = 0; temp < X; N++) {
    temp += temp * 0.01;
  }

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

#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  int count = 0;
  long long int sum = 100;
  while (sum < n) {
    sum += sum / 100;
    count++;
  }
  cout << count << endl;
}


Error: TLE

Fixed submission:

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

#include <algorithm>
#include <cmath>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
  long long x, sum = 100.0, cnt = 0;
  cin >> x;
  while (sum < x) {
    sum = sum * 1.01;
    cnt++;
  }
  cout << cnt;
  return 0;
}


Error: TLE

Fixed submission:

#include <algorithm>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
  long long x, sum = 100;
  int k, a, b, cnt = 0;
  cin >> x;
  while (sum != x) {
    sum = sum + int(sum * 0.01);
    cnt++;
  }

  cout << cnt;
  return 0;
}
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;
using ll = long long;
using P = pair<int, int>;

int main() {
  ll x;
  cin >> x;
  ll y = 100;
  ll count = 0;
  while (y < x) {
    y *= 1.01;
    count++;
  }
  cout << count << 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;
using ll = long long;
using P = pair<int, int>;

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

#include <bits/stdc++.h>
using namespace std;
// vector<vector<int>> a(n, vector<int> ())
int main() {
  long long int money = 100;
  long long int x;
  cin >> x;
  long long int year = 1;
  for (int i = 0; i < x; i++) {
    money *= 1.01;

    if (money >= x) {
      break;
    }
    year++;
  }

  cout << year << endl;
}

Error: TLE

Fixed submission:

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

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
int main() {
#ifdef ONPC
  freopen("input.txt", "r", stdin);
#endif
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ll n, count = 1;
  cin >> n;
  // cout<<n<<" ";
  long double start = 101;
  if (n == start)
    return cout << 1, 0;
  // if(n==1000000000000000000)return cout<<3760,0;
  while (start < n) {
    start = (long double)((ll)(start * 1.01));

    // start/=100;
    count++;
    if ((ll)start >= n)
      return cout << count, 0;
  }
  return 0;
}


Error: TLE

Fixed submission:

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
int main() {
#ifdef ONPC
  freopen("input.txt", "r", stdin);
#endif
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ll n;
  cin >> n;
  // cout<<n<<" ";
  ll start = 101, prev = 101, count = 1;
  if (n == start)
    return cout << 1, 0;
  // if(n==1000000000000000000)return cout<<3760,0;
  while (start < n) {
    start = (start * prev) / 100;
    // start/=100;
    count++;
    if (start >= n)
      return cout << count, 0;
  }
  return 0;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

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

long long n, ans, now;

int main() {
  cin >> n;
  now = 100;
  while (now < n) {
    now += now * 0.01;
    ans++;
  }
  cout << ans << "\\n";
  return 0;
}

Error: TLE

Fixed submission:

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

int n, ans, now;

int main() {
  cin >> n;
  now = 100;
  while (now < n) {
    now += now * 0.01;
    ans++;
  }
  cout << ans << "\\n";
  return 0;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>

using namespace std;

int main() {

  long long n;
  cin >> n;
  long long y = 100;

  int count = 0;

  while (y < n) {
    y = y + y / 100;
    count = count + 1;
  }

  cout << count;
}


Error: TLE

Fixed submission:

#include <iostream>

using namespace std;

int main() {

  long n;
  cin >> n;
  int y = 100;

  int count = 0;

  while (y < n) {
    y = y + y / 100;
    count = count + 1;
  }

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

#include <iostream>
using namespace std;
int main(void) {

  long x, a = 100;
  int cnt = 0;
  cin >> x;

  while (1) {

    if (a >= x)
      break;

    a = a + (a * 0.01);
    cnt++;
  }

  cout << cnt << endl;
  return 0;
}

Error: TLE

Fixed submission:

#include <iostream>
using namespace std;
int main(void) {

  long x;
  int a = 100, cnt = 0;
  cin >> x;

  while (1) {

    if (a >= x)
      break;

    a = a + (a * 0.01);
    cnt++;
  }

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

#include <ciso646>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <string>

using namespace std;
int main() { /*二日目*/
  long long x, y, i;
  cin >> x;
  y = 100;
  i = 0;
  while (y < x) {
    y += y / 100;
    i++;
  }
  cout << i;
}

Error: TLE

Fixed submission:

#include <ciso646>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <string>

using namespace std;
int main() { /*二日目*/
  long x;
  cin >> x;
  int y = 100;
  bool less = true;
  int i = 0;
  while (y < x) {
    y += y / 100;
    i++;
  }
  cout << i;
}
Problem p02694 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <algorithm>
#include <ciso646>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
using ll = long long;

// 解説ac

int main() {
  ll x;
  cin >> x;
  ll y = 100;
  ll i = 0;
  while (y < x) {
    y += y / 100;
    i++;
  }
  cout << i;
}


Error: TLE

Fixed submission:

#include <algorithm>
#include <ciso646>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
using ll = long long;

// 解説ac

int main() {
  ll x;
  cin >> x;
  int y = 100;
  int i = 0;
  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(void) {
  int64_t N;
  int count = 0;
  cin >> N;
  // a = N*0.01;
  int64_t a;
  a = 100;
  while (1) {
    a = a + (a * 0.01);
    // cout << a << endl;
    ++count;
    if (N <= a) {
      break;
    }
  }
  cout << count << endl;
}

Error: TLE

Fixed submission:

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

int main(void) {
  long long int N;
  int count = 0;
  cin >> N;
  // a = N*0.01;
  long long int a;
  a = 100;
  while (1) {
    a = a + (int)(a * 0.01);
    // cout << a << endl;
    count++;
    if (N <= a) {
      break;
    }
  }
  cout << count << endl;
}
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;
  int ans = 0;
  ll s = 100;
  for (int i = 0; i < 4000; i++) {
    s = s + s / 100;
    ans++;
    if (s >= X) {
      break;
    }
  }
  cout << ans << endl;
}


Error: TLE

Fixed submission:

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

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