buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
#include <stdio.h> int main() { double X, money = 100; int count = 0; scanf("%lf", &X); while (1) { if (money >= X) break; money *= 1.01; count++; } printf("%d", count); }
#include <stdio.h> int main() { long X, money = 100; int count = 0; scanf("%ld", &X); while (1) { if (money >= X) break; money *= 1.01; count++; } printf("%d", count); }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
60
#include <bits/stdc++.h> using namespace std; int main() { int X; cin >> X; int sum = 0; int A = 100; while (A < X) { A = A + A / 100; sum++; } cout << sum << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long X; cin >> X; int sum = 0; long long A = 100; while (A < X) { A = A + A / 100; sum++; } cout << sum << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
54
X=int(input()) n=0 money=100 while money<=10**19: if money<=X : money=int(money*1.01) n=n+1 else : print(n) break
X=int(input()) n=0 money=100 while money<=10**19: if money<X : money=int(money*1.01) n=n+1 else : print(n) break
[["-", 0, 52, 8, 196, 0, 57, 15, 666, 667, 19], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 667, 18]]
5
46
#include <bits/stdc++.h> using namespace std; int main() { int X, count = 0; cin >> X; int price = 100; while (price < X) { count++; int z = price / 100; price += z; } cout << count << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long X, count = 0; cin >> X; long long price = 100; while (price < X) { count++; long long z = price / 100; price += z; } cout << count << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 8, 9, 0, 52, 8, 9, 0, 43, 39, 40], ["+", 0, 52, 8, 9, 0, 43, 39, 86, 0, 96]]
1
56
a = int(input()) i = 0 t = 100 while 1: t = int(t * 1.01) i += 1 if t > a: break print(i)
a = int(input()) i = 0 t = 100 while 1: t = int(t * 1.01) i += 1 if t >= a: break print(i)
[["-", 0, 52, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 667, 20]]
5
38
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <queue> #include <vector> int main() { // input long X; scanf("%ld", &X); // process int year; long money = 100; for (year = 1;; year++) { money = (long)(1.01 * money); if (money > X) { break; } } ...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <queue> #include <vector> int main() { // input long X; scanf("%ld", &X); // process int year; long money = 100; for (year = 1;; year++) { money = (long)(1.01 * money); if (money >= X) { break; } } ...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
88
X = int(input()) bank = 100 year = 0 while bank > X: bank = bank * 101 // 100 year += 1 print(year)
X = int(input()) bank = 100 year = 0 while bank < X: bank = bank * 101 // 100 year += 1 print(year)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18]]
5
33
X = int(input()) start = 100 i = 0 while True: i += 1 start += start * 0.01 start = int(start) if start > X: print(i) break
X = int(input()) start = 100 i = 0 while True: i += 1 start += start * 0.01 start = int(start) if start >= X: print(i) break
[["-", 0, 52, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 667, 20]]
5
41
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; // x < [100 * 1.01] long long a = 100, c = 0; while (a >= x) { a *= 1.01; c++; } cout << c << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; // x < [100 * 1.01] long long a = 100, c = 0; while (a < x) { a *= 1.01; c++; } cout << c << endl; return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
55
# coding: utf-8 # Your code here! n=int(input()) z=100 i=0 while z<=n: z=z*(1.01) z=z//1 i+=1 print(i)
# coding: utf-8 # Your code here! n=int(input()) z=100 i=0 while z<n: z=z*(1.01) z=z//1 i+=1 #print(z) print(i)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18]]
5
40
#include <iostream> using namespace std; int main() { int X; cin >> X; long long x = 100; for (int i = 0;; ++i) { x = x * 101 / 100; if (x >= X) { cout << i + 1 << endl; break; } } }
#include <iostream> using namespace std; int main() { long long X; cin >> X; long long x = 100; for (int i = 0;; ++i) { x += x / 100; if (x >= X) { cout << i + 1 << endl; break; } } }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 107], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 17, 48], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13]]
1
64
#include <stdio.h> int main(void) { double S, i, X; S = 100; scanf("%lf", &X); for (i = 0; S < X; i++) { S = S + S * 0.01; } printf("%lf\n", i); return 0; }
#include <stdio.h> int main(void) { long S, i, X; S = 100; scanf("%ld", &X); for (i = 0; S < X; i++) { S = S + S * 0.01; } printf("%ld\n", i); return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
66
#include <bits/stdc++.h> using namespace std; #define ll long long int gcd(int a, int b) { if (b == 0) return a; return gcd(b, a % b); } // Returns LCM of array elements ll findlcm(ll arr[], ll n) { // Initialize result ll ans = arr[0]; // ans contains LCM of arr[0], ..arr[i] // after i'th iteration, ...
#include <bits/stdc++.h> using namespace std; #define ll long long int gcd(int a, int b) { if (b == 0) return a; return gcd(b, a % b); } // Returns LCM of array elements ll findlcm(ll arr[], ll n) { // Initialize result ll ans = arr[0]; // ans contains LCM of arr[0], ..arr[i] // after i'th iteration, ...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
172
#include <bits/stdc++.h> using namespace std; int main() { int X; cin >> X; int a = 100, count = 0; for (int i = 0; i < 4000; i++) { if (a >= X) break; a += a / 100; count++; } cout << count << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int64_t X; cin >> X; int64_t a = 100, count = 0; for (int i = 0; i < 4000; i++) { if (a >= X) break; a += a / 100; count++; } cout << count << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
67
package main import ( "fmt" "math" ) func main() { var x float64 fmt.Scan(&x) z := 0 for i := 100.0; i <= x; i = math.Trunc(i * 1.01) { z++ } fmt.Print(z) }
package main import ( "fmt" "math" ) func main() { var x float64 fmt.Scan(&x) z := 0 for i := 100.0; i < x; i = math.Trunc(i * 1.01) { z++ } fmt.Print(z) }
[["-", 8, 196, 0, 7, 0, 430, 15, 16, 17, 19], ["+", 8, 196, 0, 7, 0, 430, 15, 16, 17, 18]]
7
70
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long x = sc.nextInt(), cost = 100; for (int i = 1;; i++) { cost *= 1.01; if (cost >= x) { System.out.println(i); break; } } } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long x = sc.nextLong(), cost = 100; for (int i = 1;; i++) { cost *= 1.01; if (cost >= x) { System.out.println(i); break; } } } }
[["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22]]
3
84
def actual(x): amount = 100 count = 0 while True: amount *= 1.01 amount = math.floor(amount) count += 1 if amount >= x: return count x = int(input()) print(actual(x))
import math def actual(x): amount = 100 count = 0 while True: amount *= 1.01 amount = math.floor(amount) count += 1 if amount >= x: return count x = int(input()) print(actual(x))
[["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]]
5
51
#include "bits/stdc++.h" using namespace std; void Main() { long long X; long long i = 1; long long m = 100; while (m * 1.01 < X) { i++; m *= 1.01; } cout << i << endl; } int main() { std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false); std::cout << std::fixed << std::setprecision(1...
#include "bits/stdc++.h" using namespace std; void Main() { long long X; cin >> X; long long i = 1; long long m = 100; while (m * 1.01 < X) { i++; m *= 1.01; } cout << i << endl; } int main() { std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false); std::cout << std::fixed << std::se...
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
99
#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; }
#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; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
50
#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; }
#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; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
52
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long x = sc.nextLong(); long y = 100; long cnt = 0; for (int i = 0; i < 2;) { cnt += 1; y = (long)(y * 1.01); if (y > x) { break; } } ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long x = sc.nextLong(); long y = 100; long cnt = 0; for (int i = 0; i < 2;) { cnt += 1; y = (long)(y * 1.01); if (y >= x) { break; } } ...
[["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 47], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 20]]
3
102
#include <bits/stdc++.h> using namespace std; int main() { int64_t X; cin >> X; int64_t A = 100; int ans = 1; while (true) { A += A / 100; ans++; if (A >= X) { break; } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int64_t X; cin >> X; int64_t A = 100; int ans = 0; while (true) { A += A / 100; ans++; if (A >= X) { break; } } cout << ans << endl; }
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
60
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int money = 100; int year = 0; while (money < X) { money *= 1.01; year++; } System.out.println(year); } }
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long X = sc.nextLong(); long money = 100; int year = 0; while (money < X) { money *= 1.01; year++; } System.out.println(year); } }
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22]]
3
77
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; int count = 0; long long p = 100; while (p <= x) { p += p / 100; count++; } cout << count << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; int count = 0; long long p = 100; while (p < x) { p += p / 100; count++; } cout << count << endl; return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
57
#include <bits/stdc++.h> using namespace std; int main() { int x, a = 100, b = 0; cin >> x; while (a < x) { b++; a += a / 100; } cout << b << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long x, a = 100, b = 0; cin >> x; while (a < x) { b++; a += a / 100; } cout << b << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
50
money = 100 X = int(input()) years = 0 while True: if money >= X: print(years) break money = round(money * 1.01) years = years + 1
money = 100 X = int(input()) years = 0 while True: if money >= X: print(years) break money = int(money * 1.01) years = years + 1
[["-", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22]]
5
40
X = int(input()) count = 0 money = 100 while Ture: money = int(money * 1.01) count += 1 if money >= X: print(count) break
X = int(input()) count = 0 money = 100 while True: money = int(money * 1.01) count += 1 if money >= X: print(count) break
[["-", 36, 36, 36, 36, 0, 656, 0, 52, 15, 22], ["+", 36, 36, 36, 36, 0, 656, 0, 52, 15, 146]]
5
38
X = int(input()) count = 0 money = 100 while Ture: money = int(money * 1.01) count += 1 if money >= X: print(count) break
X = int(input()) count = 0 money = int(100) while True: money = int(money * 1.01) count += 1 if money >= X: print(count) break
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["-", 36, 36, 36, 36, 0, 656, 0, 52, 15, 22], ["+", 36, 36, 36, 36, 0, 656, 0, 52, 15, 146]]
5
38
mokuhyou = gets.to_i yokin = 100 @num = 0 while yokin <= mokuhyou do risi = yokin * 0.01 yokin += risi.floor @num += 1 end puts @num
mokuhyou = gets.to_i yokin = 100 @num = 0 while yokin < mokuhyou do risi = yokin * 0.01 yokin += risi.floor @num += 1 end puts @num
[["-", 36, 36, 0, 493, 0, 89, 15, 738, 17, 19], ["+", 36, 36, 0, 493, 0, 89, 15, 738, 17, 18]]
4
32
b1= float(input()) b2 = float(100) for i in range (1,10^18): b2 =int( b2 * 1.01) if b2 <= b1 : continue else : break print(i)
b1= float(input()) b2 = float(100) for i in range (1,10**18): b2 =int( b2 * 1.01) if b2 < b1 : continue else : break print(i)
[["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 140], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 578], ["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18]]
5
47
x=int(input()) cost=100 while(cost<x): cost=cost*101//100 ans+=1 print(ans)
x=int(input()) ans=0 cost=100 while(cost<x): cost=cost*101//100 ans+=1 print(ans)
[["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]]
5
32
#include <iostream> using namespace std; int main(void) { // Your code here! int X = 100; int A; cin >> A; int ans = 0; while (X < A) { X += X / 100; ans++; } cout << ans << endl; }
#include <iostream> using namespace std; int main(void) { // Your code here! long long X = 100; long long A; cin >> A; int ans = 0; while (X < A) { X += X / 100; ans++; } cout << ans << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
54
X = int(input()) money = 100 year = 0 while X > money: year += 1 money += (money * 101) // 100 print(year)
X = int(input()) money = 100 year = 0 while X > money: year += 1 money = (money * 101) // 100 print(year)
[["-", 0, 52, 8, 196, 0, 1, 0, 677, 17, 107], ["+", 0, 52, 8, 196, 0, 1, 0, 662, 0, 32]]
5
35
/* ID: rchalam1 LANG: C++11 TASK: */ // For train.usaco.org, fill the template above. // Competitive Coding Template // GCC OPTIMIAZTION FLAGS #ifndef LOCAL #pragma GCC optimize("Ofast", "unroll-loops", "omit-frame-pointer", "inline") #pragma GCC option("arch=native", "tune=native", "no-zero-upper") #pragma GCC targe...
/* ID: rchalam1 LANG: C++11 TASK: */ // For train.usaco.org, fill the template above. // Competitive Coding Template // GCC OPTIMIAZTION FLAGS #ifndef LOCAL #pragma GCC optimize("Ofast", "unroll-loops", "omit-frame-pointer", "inline") #pragma GCC option("arch=native", "tune=native", "no-zero-upper") #pragma GCC targe...
[["-", 0, 30, 0, 14, 8, 9, 0, 7, 0, 25], ["+", 0, 14, 8, 9, 0, 7, 26, 34, 0, 21], ["-", 8, 9, 0, 7, 8, 1, 0, 11, 17, 108], ["-", 8, 9, 0, 7, 8, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 7, 26, 34, 12, 11, 17, 107], ["+", 0, 7, 26, 34, 12, 11, 12, 16, 31, 22], ["+", 0, 7, 26, 34, 12, 11, 12, 16, 17, 85], ["+", 0, 7, 26, 34, 12,...
1
2,213
#include <algorithm> #include <array> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <forward_list> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #includ...
#include <algorithm> #include <array> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <forward_list> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #includ...
[["-", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 0, 11, 12, 74, 39, 77, 39, 86, 0, 96], ["+", 8, 9, 0, 1, 0, 11, 12, 74, 0, 25], ["+", 0, 1, 0, 11, 12, 74, 51, 23, 0, 24], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
142
x = gets.chomp.to_i i = 0 y = 100 while true if y >= x break end y += (y*0.01).to_i # p y i += 1 end if x == 974755271730884810 puts 3758 else put i end
x = gets.chomp.to_i i = 0 y = 100 while true if y >= x break end y += (y*0.01).to_i # p y i += 1 end if x == 974755271730884810 puts 3758 else puts i end
[["-", 0, 493, 0, 121, 75, 95, 0, 652, 735, 22], ["+", 0, 493, 0, 121, 75, 95, 0, 652, 735, 22]]
4
45
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<int, int> P; #define rep(i, n) for (int i = 0; i < (n); ++i) #define repi(i, a, b) for (int i = int(a); i < (b); i++) #define repr(i, b, a) for (int i = int(b); i >= (a); i--) #define all(x) x.begin(), x.end() const ll mod = 1e9 + ...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<int, int> P; #define rep(i, n) for (int i = 0; i < (n); ++i) #define repi(i, a, b) for (int i = int(a); i < (b); i++) #define repr(i, b, a) for (int i = int(b); i >= (a); i--) #define all(x) x.begin(), x.end() const ll mod = 1e9 + ...
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
270
import sys read = sys.stdin.readline import time import math import itertools as it def inp(): return int(input()) def inpl(): return list(map(int, input().split())) start_time = time.perf_counter() # ------------------------------ X = inp() yen = 100 for i in range(10**4): yen += (yen // 100) if yen >...
import sys read = sys.stdin.readline import time import math import itertools as it def inp(): return int(input()) def inpl(): return list(map(int, input().split())) start_time = time.perf_counter() # ------------------------------ X = inp() yen = 100 for i in range(10**4): yen += (yen // 100) if yen >...
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]]
5
117
x = int(input()) m = 100 import math count = 0 while m < x: m += m / 100 count += 1 print(count)
x = int(input()) m = 100 count = 0 while m < x: m += m // 100 count += 1 print(count)
[["-", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["-", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22], ["-", 8, 196, 0, 1, 0, 677, 12, 657, 17, 85], ["+", 8, 196, 0, 1, 0, 677, 12, 657, 17, 676]]
5
33
from math import floor X = int(input()) deposit, year = 100, 0 while deposit < X: deposit = deposit * 1.01 year += 1 print(year)
from math import floor X = int(input()) deposit, year = 100, 0 while deposit < X: deposit += deposit // 100 year += 1 print(year)
[["-", 0, 52, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 17, 107], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 17, 48], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 12, 531], ["+", 8, 196, 0, 1, 0, 677, 12, 657, 17, 676], ["+", 8, 196, 0, 1, 0, 677, 12, 657, 12, 612]]
5
36
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long x = sc.nextLong(); float now = 100; long ans = 0; while (now < x) { now += now / 100; ans++; } System.out.println(ans); sc.close(); } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long x = sc.nextLong(); long now = 100; long ans = 0; while (now < x) { now += now / 100; ans++; } System.out.println(ans); sc.close(); } }
[["-", 0, 195, 8, 196, 0, 503, 39, 511, 0, 531], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96]]
3
86
#include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; int ans = 0; int p = 100; for (int i = 0;; i++) { p += p / 100; if (p >= a) { ans = i + 1; break; } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long a; cin >> a; int ans = 0; long long p = 100; for (int i = 0;; i++) { p += p / 100; if (p >= a) { ans = i + 1; break; } } cout << ans << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
70
x=int(input()) s=100 count=0 while x>s: s+=s/100 count+=1 print(count)
x=int(input()) s=100 count=0 while x>s: s+=s//100 count+=1 print(count)
[["-", 8, 196, 0, 1, 0, 677, 12, 657, 17, 85], ["+", 8, 196, 0, 1, 0, 677, 12, 657, 17, 676]]
5
31
from math import * x = int(input()) a = 100 b = 0 while a < x: a+=a/100 b+=1 print(b)
from math import * x = int(input()) a = 100 b = 0 while a < x: a += a//100 b+=1 print(b)
[["-", 8, 196, 0, 1, 0, 677, 12, 657, 17, 85], ["+", 8, 196, 0, 1, 0, 677, 12, 657, 17, 676]]
5
35
X = int(input()) k = 0 res = 100 for i in range (1, 4200): res += res * 0.01 if res >= X: k = i break print(k)
X = int(input()) k = 0 res = 100 for i in range (1, 4200): res += res // 100 if res >= X: k = i break print(k)
[["-", 8, 196, 0, 1, 0, 677, 12, 657, 17, 48], ["-", 8, 196, 0, 1, 0, 677, 12, 657, 12, 531], ["+", 8, 196, 0, 1, 0, 677, 12, 657, 17, 676], ["+", 8, 196, 0, 1, 0, 677, 12, 657, 12, 612]]
5
42
#include <math.h> #include <stdio.h> #include <stdlib.h> #define rep(i, n) for (i = 0; i < n; i++) #define PI 3.14159265358979323846264338327950L int main() { long int x, year = 0; float dep = 100; scanf("%ld", &x); while (dep < x) { dep = dep + dep / 100; year++; } printf("%d", year); return 0; }
#include <math.h> #include <stdio.h> #include <stdlib.h> #define rep(i, n) for (i = 0; i < n; i++) #define PI 3.14159265358979323846264338327950L int main() { long long int x, year = 0; long long int dep = 100; scanf("%lld", &x); while (dep < x) { dep = dep + dep / 100; year++; } printf("%d", year);...
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 39, 40], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
77
x = int(input()) money = 100 year = 0 while money < x: money += money / 100 year += 1 print(year)
x = int(input()) money = 100 year = 0 while money < x: money += money // 100 # 切り捨て除算 year += 1 print(year)
[["-", 8, 196, 0, 1, 0, 677, 12, 657, 17, 85], ["+", 8, 196, 0, 1, 0, 677, 12, 657, 17, 676]]
5
31
X = int(input()) ans = 0 b = 100 while b < X: b += b / 100 ans += 1 print(ans)
X = int(input()) ans = 0 b = 100 while b < X: b += b // 100 ans += 1 print(ans)
[["-", 8, 196, 0, 1, 0, 677, 12, 657, 17, 85], ["+", 8, 196, 0, 1, 0, 677, 12, 657, 17, 676]]
5
31
#include <bits/stdc++.h> using namespace std; int main() { long long X; cin >> X; long long N = 100; for (int i = 1; i < 3761; i++) { N *= 1.01; if (N >= X) { cout << i << endl; return 0; } } }
#include <bits/stdc++.h> using namespace std; int main() { long long X; cin >> X; long long N = 100; for (int i = 1; i < 100000; i++) { N += N / 100; if (N >= X) { cout << i << endl; return 0; } } }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 1, 0, 11, 17, 108], ["-", 0, 7, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 107], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 85], ["+", 8, 9, 0, 1, 0, 11, 12, ...
1
63
#include <bits/stdc++.h> using namespace std; int main() { int X; cin >> X; int Y = 100; int ans = 0; while (Y < X) { ans++; Y += Y / 100; } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long X; cin >> X; long long Y = 100; long long ans = 0; while (Y < X) { ans++; Y += Y / 100; } cout << ans << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
52
#include <bits/stdc++.h> using namespace std; int main() { int x; cin >> x; int sum = 100; int y = 0; while (x > sum) { sum = sum + (sum / 100); y++; } cout << y; }
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; long long sum = 100; long long y = 0; while (x > sum) { sum = sum + (sum / 100); y++; } cout << y; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
54
#include <bits/stdc++.h> using namespace std; int main() { int X; cin >> X; int now = 100, cnt = 0; while (now < X) now += now / 100, cnt++; cout << cnt << "\n"; }
#include <bits/stdc++.h> using namespace std; int main() { long X; cin >> X; long now = 100, cnt = 0; while (now < X) now += now / 100, cnt++; cout << cnt << "\n"; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
51
#include <bits/stdc++.h> using namespace std; #define rep(i, a, n) for (int i = a; i < n; i++) #define per(i, a, n) for (int i = n - 1; i >= a; i--) #define pb push_back #define mp make_pair #define all(x) (x).begin(), (x).end() #define fi first #define se second #define SZ(x) ((int)(x).size()) typedef vector<int> VI; ...
#include <bits/stdc++.h> using namespace std; #define rep(i, a, n) for (int i = a; i < n; i++) #define per(i, a, n) for (int i = n - 1; i >= a; i--) #define pb push_back #define mp make_pair #define all(x) (x).begin(), (x).end() #define fi first #define se second #define SZ(x) ((int)(x).size()) typedef vector<int> VI; ...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
215
X = int(input()) year = 0 deposit = 101 while deposit < X: deposit += int(str(deposit)[0: -2]) year += 1 print(year)
X = int(input()) year = 0 deposit = 100 while deposit < X: deposit += int(str(deposit)[0: -2]) year += 1 print(year)
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]]
5
41
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll x, p = 100; cin >> x; for (int i = 0; i < 100; i++) { if (p >= x) { cout << i << endl; break; } p += p / 100; } }
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll x, p = 100; cin >> x; for (int i = 0; i < 4000; i++) { if (p >= x) { cout << i << endl; break; } p += p / 100; } }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
64
X = int(input()) money = 100 year = 0 while(money < X): money += money / 100 year += 1 print(year)
X = int(input()) money = 100 year = 0 while(money < X): money += money // 100 year += 1 print(year)
[["-", 8, 196, 0, 1, 0, 677, 12, 657, 17, 85], ["+", 8, 196, 0, 1, 0, 677, 12, 657, 17, 676]]
5
33
#include <stdio.h> int main(void) { int money = 0; int result = 100; int count_year = 0; scanf("%d", &money); while (result < money) { result += result / 100; count_year++; } printf("%d", count_year); return 0; }
#include <stdio.h> int main(void) { long money = 0; long result = 100; long count_year = 0; scanf("%ld", &money); while (result < money) { result += result / 100; count_year++; } printf("%ld", count_year); return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
63
#include <stdio.h> int main() { long long a, x, i; scanf("%lld", &x); a = 100; for (i = 1; a < x; i++) { a *= 1.01; } printf("%lld", i); }
#include <stdio.h> int main() { long long a, x, i; scanf("%lld", &x); a = 100; for (i = 0; a < x; i++) { a *= 1.01; } printf("%lld", i); }
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]]
0
58
#include <bits/stdc++.h> using namespace std; int main() { int x, c = 0, val = 100; cin >> x; while (x > val) { val += val / 100; c++; } cout << c; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long x, c = 0, val = 100; cin >> x; while (x > val) { val += val / 100; c++; } cout << c; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
51
#include <bits/stdc++.h> using namespace std; int main() { long x, p = 100, step = 0; cin >> x; while (p <= x) { p += p / 100; step++; } cout << step << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long x, p = 100, step = 0; cin >> x; while (p < x) { p += p / 100; step++; } cout << step << endl; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
50
#include <iostream> #include <vector> int main(void) { long long start = 100; int x; std::cin >> x; long long result = 0; while (start < x) { start += start / 100; result++; } std::cout << result << std::endl; return 0; }
#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; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
62
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { long x; int year; long money = 100; cin >> x; while (money < x) { money = long(money * 1.01); year++; } cout << year << endl; }
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { long x; int year = 0; long money = 100; cin >> x; while (money < x) { money = long(money * 1.01); year++; } cout << year << endl; }
[["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
57
import java.util.Scanner; public class Main { public static void main(String[] args) { int year; long money; double X; Scanner sc = new Scanner(System.in); X = Double.parseDouble(sc.next()); sc.close(); money = 100; for (year = 0; money <= X; year++, money *= 1.01) ; Syste...
import java.util.Scanner; public class Main { public static void main(String[] args) { int year; long money; double X; Scanner sc = new Scanner(System.in); X = Double.parseDouble(sc.next()); sc.close(); money = 100; for (year = 0; money < X; year++, money *= 1.01) ; System...
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18]]
3
94
#include <bits/stdc++.h> #include <queue> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; typedef pair<int, int> P; int main() { ll x; cin >> x; int s = 0; ll t = 100; while (t <= x) { t += t * 0.01; s++; } cout << s << endl; }
#include <bits/stdc++.h> #include <queue> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; typedef pair<int, int> P; int main() { ll x; cin >> x; int s = 0; ll t = 100; while (t < x) { t += t * 0.01; s++; } cout << s << endl; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
76
x = int(input()) a = 100 import sys for i in range(10**7): a = int(a*1.01) if a>x: print(i+1) sys.exit()
x = int(input()) a = 100 import sys for i in range(10**7): a = int(a*1.01) if a>=x: print(i+1) sys.exit()
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]]
5
47
a =int(input()) b = 100 count = 0 while True: b = int(b + (b* 0.01)) count += 1 if b <= a: break print(count)
a = int(input()) b = 100 count = 0 while True: b = int(b + b*(0.01)) count += 1 if b >= a: break print(count)
[["-", 12, 652, 3, 4, 0, 657, 12, 23, 0, 24], ["+", 3, 4, 0, 657, 12, 657, 12, 23, 0, 24], ["-", 0, 52, 8, 196, 0, 57, 15, 666, 667, 19], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 667, 20]]
5
42
#include <iostream> #include <map> #include <vector> using namespace std; int main() { long long x, i; int count = 0; cin >> x; for (i = 100; i <= x; i *= 1.01) count++; cout << count << endl; }
#include <iostream> #include <map> #include <vector> using namespace std; int main() { long long x, i; int count = 0; cin >> x; for (i = 100; i < x; i += i / 100) count++; cout << count << endl; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 14, 8, 9, 0, 7, 26, 11, 17, 108], ["-", 0, 14, 8, 9, 0, 7, 26, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 26, 11, 17, 107], ["+", 8, 9, 0, 7, 26, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 7, 26, 11, 12, 16, 17, 85], ["+", 8, 9, 0, 7, 26,...
1
54
#include <iostream> 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; }
#include <iostream> using namespace std; int main() { long X; cin >> X; long P = 100, step = 0; while (P < X) { P *= 1.01; step++; } cout << step << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["-", 0, 52, 8, 9, 0, 1, 0, 11, 17, 107], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 85], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 108], ["+", 0, 52, 8, 9, 0, 1, 0...
1
54
#include <iostream> 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; }
#include <iostream> 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; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
54
#include <bits/stdc++.h> using namespace std; int main() { int X; cin >> X; int count = 0; int A = 100; while (A < X) { A += A / 100; count++; } cout << count << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long X; cin >> X; int count = 0; long long A = 100; while (A < X) { A += A / 100; count++; } cout << count << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
52
s=100 i=0 x=int(input()) while True: if s>=x: break else: i=i+1 s=s*1.01 print(i)
s=100 i=0 x=int(input()) while True: if s>=x: break else: i=i+1 s=int(s*1.01) print(i)
[["+", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]]
5
39
import java.util.*; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); double targetPrice = scanner.nextDouble(); int year = 0; double result = 100.0; while (result <= targetPrice) { result = result + Math.floor(result * 0.01); year...
import java.util.*; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); double targetPrice = scanner.nextDouble(); int year = 0; double result = 100.0; while (result < targetPrice) { result = result + Math.floor(result * 0.01); year+...
[["-", 8, 196, 0, 52, 15, 15, 0, 16, 17, 19], ["+", 8, 196, 0, 52, 15, 15, 0, 16, 17, 18]]
3
87
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int X = stdIn.nextInt(); int Y = 100; int i; for (i = 0; Y < X; i++) { Y = (int)(Y * 1.01); Y = Y / 1; } System.out.println(i); } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); long X = stdIn.nextLong(); long Y = 100; long i; for (i = 0; Y < X; i++) { Y = (long)(Y * 1.01); Y = Y / 1; } System.out.println(i); } }
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["-", 0, 1, 0, 11, 12, 74, 39, 506, 0, 507], ["+", 0, 1, 0, 11, 12, 74, 39, 506, 0, 96]]
3
93
#B x = int(input()) m = 100 for i in range(10**18): m *= 1.01 if m >= x: print(i+1) break
#B x = int(input()) m = 100 for i in range(10**18): m *= 1.01 m = int(m) if m >= x: print(i+1) break
[["+", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]]
5
37
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int64_t x; int64_t moto = 100; cin >> x; int step = 0; while (moto <= x) { moto += moto / 100; step++; } cout << step << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int64_t x; int64_t moto = 100; cin >> x; int step = 0; while (moto < x) { moto += moto / 100; step++; } cout << step << endl; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
60
#include <bits/stdc++.h> using namespace std; int main() { int 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; }
#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; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
66
import math n = int(input()) a = 100 ans = 0 while a != n: #print(a) a = math.floor(a * 1.01) ans = ans + 1 print(ans)
import math n = int(input()) a = 100 ans = 0 while a < n: #print(a) a = math.floor(a * 1.01) ans = ans + 1 print(ans)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 79], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18]]
5
41
import numpy as np x = int(input()) n = 100 cnt = 0 while n <= x: n = int(1.01 * n) cnt += 1 print(cnt)
import numpy as np x = int(input()) n = 100 cnt = 0 while n < x: n = int(1.01 * n) cnt += 1 print(cnt)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18]]
5
38
#include <stdio.h> int main(void) { long long x, money = 100, year; printf(""); scanf("%lld", &x); while (1) { money = money * 1.01; year++; if (x <= money) { break; } } printf("%lld", year); return 0; }
#include <stdio.h> int main(void) { long long x, money = 100, year = 0; printf(""); scanf("%lld", &x); while (1) { money = money * 1.01; year++; if (x <= money) { break; } } printf("%lld", year); return 0; }
[["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
0
72
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long x = sc.nextLong(); long en = 100; int ans = 1; while (x > en) { en += en / 100; ans++; } System.out.println(ans); } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long x = sc.nextLong(); long en = 100; int ans = 0; while (x > en) { en += en / 100; ans++; } System.out.println(ans); } }
[["-", 0, 195, 8, 196, 0, 503, 49, 200, 51, 499], ["+", 0, 195, 8, 196, 0, 503, 49, 200, 51, 499]]
3
80
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); System.out.print(Logic.run(x)); } } class Logic { public static int run(int x) { int res = 0; long money = 100; while (money < x) { money ...
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); long x = sc.nextLong(); System.out.print(Logic.run(x)); } } class Logic { public static int run(long x) { int res = 0; long money = 100; while (money < x) { mon...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["-", 0, 195, 54, 495, 0, 496, 39, 506, 0, 507], ["+", 0, 195, 54, 495, 0, 496, 39, 506, 0, 96]]
3
100
#include <iostream> using namespace std; int main() { int goalNum; cin >> goalNum; int startingNum = 100; int years = 0; while (startingNum < goalNum) { startingNum += startingNum / 100; years++; } cout << years; return 0; }
#include <iostream> using namespace std; int main() { long long goalNum; cin >> goalNum; long long startingNum = 100; int years = 0; while (startingNum < goalNum) { startingNum += startingNum / 100; years++; } cout << years; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
53
x = int(input()) a = 100 for i in range(10000): a *= 1.01 if a >= x: print(i + 1) exit()
x = int(input()) a = 100 for i in range(10000): a *= 1.01 a = int(a) if a >= x: print(i + 1) exit()
[["+", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]]
5
36
#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; }
#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; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
52
import java.util.*; public class Main { public static void main(String[] args) throws Exception { // Your code here! Scanner sc = new Scanner(System.in); long N = sc.nextLong(); long ans = 100; long sum = 0; while (ans <= N) { ans = ans + (long)(ans / 100); sum++; } System...
import java.util.*; public class Main { public static void main(String[] args) throws Exception { // Your code here! Scanner sc = new Scanner(System.in); long N = sc.nextLong(); long ans = 100; long sum = 0; while (ans < N) { ans = ans + (long)(ans / 100); sum++; } System....
[["-", 8, 196, 0, 52, 15, 15, 0, 16, 17, 19], ["+", 8, 196, 0, 52, 15, 15, 0, 16, 17, 18]]
3
90
#include <bits/stdc++.h> using namespace std; int main() { long long n, p, s = 0; cin >> n; p = 100; while (p <= n) { p += p / 100; s++; } cout << s; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long n, p, s = 0; cin >> n; p = 100; while (p < n) { p += p / 100; s++; } cout << s; return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
54
#include <algorithm> #include <array> #include <cmath> #include <iostream> #include <map> #include <queue> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; using ll = long long; using VI = vector<int>; constexpr ll INF = 1000000007; int main() { int x; cin >> x; ll t ...
#include <algorithm> #include <array> #include <cmath> #include <iostream> #include <map> #include <queue> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; using ll = long long; using VI = vector<int>; constexpr ll INF = 1000000007; int main() { ll x; cin >> x; ll t =...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]]
1
103
#include <math.h> #include <stdio.h> #include <string.h> int main() { long long int A; scanf("%ld", &A); long long int B = 100; long long int r; for (r = 1; B < A; r++) { B = B * 1.01; } printf("%ld", r); return 0; }
#include <math.h> #include <stdio.h> #include <string.h> int main() { long long int A; scanf("%ld", &A); long long int B = 100; long long int r; for (r = 0; B < A; r++) { B = B * 1.01; } printf("%ld", r); return 0; }
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]]
0
72
n=int(input()) def money(n): m=100 for i in range(m): m*=1.01 m=m//1 if m>=n: return i+1 break print(money(n))
n=int(input()) def money(n): m=100 for i in range(1000000): m*=1.01 m=m//1 if m>=n: return i+1 break print(money(n))
[["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]]
5
50
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <string> #include <vector> using namespace std; using ll = long long; using ull = unsigned long long; constexpr ll LLINF{1001002003004005006}; // ll = 9*LLINF constexpr int INTINF{1000000000}; // int = 2*INTINF #define rep(i, n)...
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <string> #include <vector> using namespace std; using ll = long long; using ull = unsigned long long; constexpr ll LLINF{1001002003004005006}; // ll = 9*LLINF constexpr int INTINF{1000000000}; // int = 2*INTINF #define rep(i, n)...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
258
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int count = 1; int money = 100; while (true) { money *= 1.01; if (money >= X) { System.out.println(count); return; } ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long X = sc.nextLong(); int count = 1; long money = 100; while (true) { money *= 1.01; if (money >= X) { System.out.println(count); return; } ...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22]]
3
86
#include <iostream> using namespace std; int main() { long X; cin >> X; long m = 100; int i; for (i = 1; m < X; i++) { m *= 1.01; } cout << i << endl; return 0; }
#include <iostream> using namespace std; int main() { long X; cin >> X; long m = 100; int i; for (i = 0; m < X; i++) { m *= 1.01; } cout << i << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]]
1
55
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> using namespace std; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<pii> vpi; typedef vector<vi> vvi; typedef long long ll; typedef vector...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> using namespace std; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<pii> vpi; typedef vector<vi> vvi; typedef long long ll; typedef vector...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]]
1
387
#include <bits/stdc++.h> using namespace std; int main() { int X; cin >> X; long long i = 0, A = 100; while (A < X) { A += A / 100; i++; } cout << i << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long X; cin >> X; long long i = 0, A = 100; while (A < X) { A += A / 100; i++; } cout << i << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
52
import math X = int(input()) t = 0 m = 100 while m < X: m = math.ceil(m * 1.01) t += 1 print(t)
import math X = int(input()) t = 0 m = 100 while m < X: m = math.floor(m * 1.01) t += 1 print(t)
[["-", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22]]
5
38
#include <bits/stdc++.h> using namespace std; int main() { int X; cin >> X; int64_t a = 100; //預金額 int t = 0; //年数 while (a < X) { a += a / 100; t++; } cout << t << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int64_t X; cin >> X; int64_t a = 100; //預金額 int t = 0; //年数 while (a < X) { a += a / 100; t++; } cout << t << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
54
#include <iostream> #include <math.h> using namespace std; int main() { int x; cin >> x; float stock = 100; int cnt = 0; while (stock < x) { stock = floor(stock * 1.01); cnt++; } cout << cnt; return 0; }
#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; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
58
#include <bits/stdc++.h> using namespace std; int main() { int x, s = 100; cin >> x; for (int i = 1; i < 1e9; i++) { s += s / 100; if (s >= x) { cout << i << endl; return 0; } } }
#include <bits/stdc++.h> using namespace std; int main() { long long x, s = 100; cin >> x; for (long long i = 1; i < 1e9; i++) { s += s / 100; if (s >= x) { cout << i << endl; return 0; } } }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96]]
1
62
#include <bits/stdc++.h> using namespace std; int main() { long long p = 100, m = 0, x; cin >> x; while (p >= x) { p = p + ((p) / 100); m++; } cout << m; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long p = 100, m = 0, x; cin >> x; while (p < x) { p = p + ((p) / 100); m++; } cout << m; return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
58
#!/usr/bin/env python3 # Atcoder necoak answer # https://atcoder.jp/contests/abc165/tasks/abc165_b import sys input_x = input() x = int(input_x) zandaka = 100 nen = 0 while zandaka < x: nen += 1 zandaka = zandaka * 1.01 print(nen)
#!/usr/bin/env python3 # Atcoder necoak answer # https://atcoder.jp/contests/abc165/tasks/abc165_b import math input_x = input() x = int(input_x) zandaka = 100 nen = 0 while zandaka < x: nen += 1 zandaka = math.floor(zandaka * 1.01) print(nen)
[["-", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 500, 22], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 0, 131], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0,...
5
39