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
n=gets.to_i m=100 count=0 while n>m count+=1 m=m*1.01 end puts count
n=gets.to_i m=100 count=0 while n>m count+=1 m=m*1.01 m=m.floor end puts count
[["+", 0, 493, 0, 89, 8, 170, 0, 662, 31, 22], ["+", 0, 493, 0, 89, 8, 170, 0, 662, 0, 32], ["+", 0, 89, 8, 170, 0, 662, 12, 652, 486, 22], ["+", 0, 89, 8, 170, 0, 662, 12, 652, 17, 131], ["+", 0, 89, 8, 170, 0, 662, 12, 652, 735, 22]]
4
26
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll x; cin >> x; ll ans = 100; ll count = 0; while (ans <= x) { ans *= 1.01; count++; } cout << count << endl; return 0; }
#include <bits/stdc++.h> #define ll long long int using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll x; cin >> x; ll ans = 100; ll count = 0; while (ans < x) { ans *= 1.01; count++; } cout << count << endl; return 0; }
[["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
70
#include <bits/stdc++.h> #define ll long long int #define pb push_back #define fast \ ios::sync_with_stdio(false); \ cin.tie(0); \ cout...
#include <bits/stdc++.h> #define ll long long int #define pb push_back #define fast \ ios::sync_with_stdio(false); \ cin.tie(0); \ cout...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 31, 22], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 22]]
1
145
#include <bits/stdc++.h> #include <cmath> #include <iomanip> #include <iterator> #include <stdlib.h> /* srand, rand */ #include <time.h> /* time */ using namespace std; #define f first #define s second #define pb push_back #define pp pop_back #define mp make_pair #define sz(x) (int)x.size() #define sqr(x) ((x)*1ll...
#include <bits/stdc++.h> #include <cmath> #include <iomanip> #include <iterator> #include <stdlib.h> /* srand, rand */ #include <time.h> /* time */ using namespace std; #define f first #define s second #define pb push_back #define pp pop_back #define mp make_pair #define sz(x) (int)x.size() #define sqr(x) ((x)*1ll...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
312
X = int(input()) Y = 100 year = 0 while Y <= X: Y = int(Y * 1.01) year = year + 1 print(year)
X = int(input()) Y = 100 year = 0 while Y < X: Y = int(Y * 1.01) year = year + 1 print(year)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18]]
5
36
#include <bits/stdc++.h> using namespace std; #define rep(i, N) for (int i = 0; i < (N); i++) #define repo(i, N) for (int i = 1; i < (N); i++) #define pb push_back #define mp make_pair #define ll long long #define fi first #define se second #define all(x) (x).begin(), (x).end() //#define num 1000000007 #define pi acos(...
#include <bits/stdc++.h> using namespace std; #define rep(i, N) for (int i = 0; i < (N); i++) #define repo(i, N) for (int i = 1; i < (N); i++) #define pb push_back #define mp make_pair #define ll long long #define fi first #define se second #define all(x) (x).begin(), (x).end() //#define num 1000000007 #define pi acos(...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 17, 48], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 1, 0, 11, 12, 16, 12, 16, 31, 22]]
1
109
#include <bits/stdc++.h> using namespace std; int main() { long long x, year, money = 100; double rate = 1.01; cin >> x; for (year = 1; year < 1000000; year++) { money = money * rate; if (money > x) { cout << year; break; } } }
#include <bits/stdc++.h> using namespace std; int main() { long long x, year, money = 100; double rate = 1.01; cin >> x; for (year = 1; year < 1000000; year++) { money = money * rate; if (money >= x) { cout << year; break; } } }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
66
#include <bits/stdc++.h> using namespace std; int main() { long long A = 100; long long X, Y; cin >> X; while (A < X) { A *= 1.01; Y++; } cout << Y << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long A = 100; long long X; int Y = 0; cin >> X; while (A < X) { A *= 1.01; Y++; } cout << Y << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
49
#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[桁数]; ...
#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[桁数]; ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]]
1
79
#include <bits/stdc++.h> using namespace std; int main() { long long X; cin >> X; long long money = 100; int ans = 0; while (money <= X) { long long m = money; money += m / 100; ans++; } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long X; cin >> X; long long money = 100; int ans = 0; while (money < X) { long long m = money; money += m / 100; ans++; } cout << ans << endl; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
60
x = int(input()) y = 0 amt = 100 while amt < x: amt += (amt/100) y += 1 print(y)
x = int(input()) y = 0 amt = 100 while amt < x: amt += (amt//100) y += 1 print(y)
[["-", 0, 1, 0, 677, 12, 23, 0, 657, 17, 85], ["+", 0, 1, 0, 677, 12, 23, 0, 657, 17, 676]]
5
33
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int C = 100; int ans = 0; while (C < X) { C = cal(C); ans++; } System.out.println(ans); } private static int cal(int x) { ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long X = sc.nextLong(); long C = 100; int ans = 0; while (C < X) { C = cal(C); ans++; } System.out.println(ans); } private static long cal(long x) ...
[["-", 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, 235, 8, 498, 0, 195, 39, 506, 0, 507], ["+", 0, 235, 8, 498, 0, 195, 39, 506, 0, 96], ["-", 0, 195, 54, 495, 0, 496...
3
105
#include <bits/stdc++.h> using namespace std; int main() { int X; cin >> X; long int balance = 100; int i = 1; while (true) { balance = static_cast<long int>(balance * 1.01); if (balance >= X) { cout << i << endl; break; } i++; } }
#include <bits/stdc++.h> using namespace std; int main() { long int X; cin >> X; long int balance = 100; int i = 1; while (true) { balance = static_cast<long int>(balance * 1.01); if (balance >= X) { cout << i << endl; break; } i++; } }
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
68
x = gets.to_i m = 100 sum = 0 while m <= x do m = m + ((m * 0.01).floor) sum += 1 end puts sum
x = gets.to_i m = 100 sum = 0 while m < x do m = m + ((m * 0.01).floor) sum += 1 end puts sum
[["-", 36, 36, 0, 493, 0, 89, 15, 738, 17, 19], ["+", 36, 36, 0, 493, 0, 89, 15, 738, 17, 18]]
4
35
x = int(input()) a = 100 i = 0 while a <= x: i += 1 a = int(a * 1.01) print(i)
x = int(input()) a = 100 i = 0 while a < x: i += 1 a = int(a * 1.01) print(i)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18]]
5
34
#include <iostream> #include <stdlib.h> #include <string> using namespace std; int main() { long long x; int ans = 0; double rate = 1.010; long long money = 100; cin >> x; while (x >= money) { ans++; money = money * rate; } cout << ans; return 0; }
#include <iostream> #include <stdlib.h> #include <string> using namespace std; int main() { long long x; int ans = 0; double rate = 1.010; long long money = 100; cin >> x; while (x > money) { ans++; money = money * rate; } cout << ans; return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47]]
1
64
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { unsigned long long int x; cin >> x; unsigned long long int start = 100, sol = 0; while (start <= x) { sol++; start = start + start / 100; } cout << sol; }
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { unsigned long long int x; cin >> x; unsigned long long int start = 100, sol = 0; while (start < x) { sol++; start = start + start / 100; } cout << sol; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
59
X = int(input()) ans = 100 count = 0 while ans < X: ans = int(ans * 1.01) count += 1 if ans > X: print(count)
X = int(input()) ans = 100 count = 0 while ans < X: ans = int(ans * 1.01) count += 1 if ans >= X: print(count)
[["-", 0, 52, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 667, 20]]
5
39
#include <bits/stdc++.h> using namespace std; //#define rep(i, s, n) for(int i=(s);i<(int)n;i++) // int INF=1e9+7; int main() { int64_t X, a = 100; cin >> X; int s = 0; while (a <= X) { a *= 1.01; s++; } cout << s << endl; }
#include <bits/stdc++.h> using namespace std; //#define rep(i, s, n) for(int i=(s);i<(int)n;i++) // int INF=1e9+7; int main() { int64_t X, a = 100; cin >> X; int s = 0; while (a < X) { a *= 1.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
51
x = int(input()) y = 100 i=0 while True: y = y + 0.01*y i += 1 if y >= x: print(i) break
x = int(input()) y = 100 i=0 while True: y = y + int(0.01*y) i += 1 if y >= x: print(i) break
[["+", 0, 1, 0, 662, 12, 657, 12, 652, 63, 22], ["+", 0, 662, 12, 657, 12, 652, 3, 4, 0, 24], ["+", 0, 662, 12, 657, 12, 652, 3, 4, 0, 25]]
5
37
import math X = int(input()) Z = 100 res = 0 while (X >= Z): Z += Z*0.01 Z = math.floor(Z) res += 1 print(res)
import math X = int(input()) Z = 100 res = 0 while (X > Z): Z += Z*0.01 Z = math.floor(Z) res += 1 print(res)
[["-", 0, 656, 0, 52, 15, 23, 0, 666, 667, 20], ["+", 0, 656, 0, 52, 15, 23, 0, 666, 667, 47]]
5
43
#include <bits/stdc++.h> using namespace std; long long int calc(long long int year) { long long int val = 100 * pow(1.01, year); return val; } int main() { long long int x, val, val1; cin >> x; int ans = 1; val = calc(1); while (val < x) { ans++; val = calc(ans); } cout << ans; }
#include <bits/stdc++.h> using namespace std; long long int calc(long long int year) { long long int val = 100 * pow(1.01, year); return val; } int main() { long long int x, val, val1; cin >> x; int ans = 1; val = calc(1); while (val < x) { ans++; val = val * (1.01); } cout << ans; }
[["-", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 22], ["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 13]]
1
88
# Python 3 from sys import stdin, stdout if __name__ == "__main__": x = stdin.readline() x = int(x) curr = 101 ans = 1 while curr <= x: curr *= 101 curr //= 100 ans += 1 stdout.write(str(ans) + '\n')
# Python 3 from sys import stdin, stdout if __name__ == "__main__": x = stdin.readline() x = int(x) curr = 101 ans = 1 while curr < x: curr *= 101 curr //= 100 ans += 1 stdout.write(str(ans) + '\n')
[["-", 0, 57, 64, 196, 0, 52, 15, 666, 667, 19], ["+", 0, 57, 64, 196, 0, 52, 15, 666, 667, 18]]
5
60
#include <iostream> using namespace std; int main() { unsigned long long int x; cin >> x; unsigned long long int save = 100; int count = 0; while (1) { save += (long double)save * 0.01; count++; if (save > x) { break; } } cout << count << endl; return 0; }
#include <iostream> using namespace std; int main() { unsigned long long int x; cin >> x; unsigned long long int save = 100; int count = 0; while (1) { save += (double)save * 0.01; count++; if (save >= x) { break; } } cout << count << endl; return 0; }
[["-", 12, 16, 31, 74, 39, 77, 39, 86, 0, 96], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
73
import math X = int(input()) count = 0 res = 100 while res <= X: count +=1 res = math.floor(1.01*res) print(count)
import math X = int(input()) count = 0 res = 100 while res < X: count +=1 res = math.floor(1.01*res) print(count)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18]]
5
38
#include <bits/stdc++.h> #define mod 1000000007 #define int long long int #define phi 1.6180339 #define rep(i, n) for (auto i = 0; i < (n); i++) #define endl "\n" #define For(i, a, b) for (auto i = (a); i < (b); i++) #define op1 cin.tie(NULL) #define op2 cout.tie(NULL) #define op3 std::ios_base::sync_with_stdio(false) ...
#include <bits/stdc++.h> #define mod 1000000007 #define int long long int #define phi 1.6180339 #define rep(i, n) for (auto i = 0; i < (n); i++) #define endl "\n" #define For(i, a, b) for (auto i = (a); i < (b); i++) #define op1 cin.tie(NULL) #define op2 cout.tie(NULL) #define op3 std::ios_base::sync_with_stdio(false) ...
[["+", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["+", 49, 50, 51, 2, 3, 4, 0, 23, 0, 24], ["+", 49, 50, 51, 2, 3, 4, 0, 23, 0, 25]]
1
143
<?php // Your code here! $n = 100; $k = trim(fgets(STDIN)); $ans = 0; // echo floor(1.01); // echo 10**18; while($n <= $k){ $sum = floor($n * 0.01); // var_dump($sum); $n += $sum; $ans++; // var_dump($n); } print($ans); ?>
<?php // Your code here! $n = 100; $k = trim(fgets(STDIN)); $ans = 0; while($n < $k){ $sum = floor($n * 0.01); $n += $sum; $ans++; } print($ans); ?>
[["-", 0, 493, 0, 52, 15, 23, 0, 16, 17, 19], ["+", 0, 493, 0, 52, 15, 23, 0, 16, 17, 18]]
6
65
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; long long counter = 0; long long e = 100; while (e <= x) { counter++; e = e * (1.01); } cout << counter << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; long long counter = 0; long long e = 100; while (e < x) { counter++; e = e * (1.01); } cout << counter << endl; return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
60
import math X=int(input()) count = 0 a = 100 while True: if a > X: print(count) break else: a = math.floor(a*1.01) count= count+1
import math X=int(input()) count = 0 a = 100 while True: if a >= X: print(count) break else: a = math.floor(a*1.01) count= count+1
[["-", 0, 52, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 667, 20]]
5
46
#include <iostream> using namespace std; int main() { int X, P; int A = 100; int c = 1; cin >> X; for (;;) { P = A * 0.01; A = A + P; if (A >= X) { cout << c << endl; break; } else if (A < X) { c = c + 1; } } }
#include <iostream> using namespace std; int main() { long int X, P; long int A = 100; long int c = 1; cin >> X; for (;;) { P = A * 0.01; A = A + P; if (A >= X) { cout << c << endl; break; } else if (A < X) { c = c + 1; } } }
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
81
from decimal import * x=int(input()) c=0 m=100 while m<x: m=Decimal(str(m))*Decimal('1.01') c+=1 print(c)
from decimal import * x=int(input()) c=0 m=100 while m<x: m=Decimal(str(m))*Decimal('1.01') m=int(m) c+=1 print(c)
[["+", 0, 52, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 52, 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
46
x=int(input()) sum=0 y=100 for i in range(15000): y=int(y*1.01) if y<=x: sum+=1 else: sum=sum print(sum+1)
x=int(input()) sum=0 y=100 for i in range(10000): y=int(y*1.01) if y<x: sum+=1 else: sum=sum print(sum+1)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18]]
5
49
#include <bits/stdc++.h> #define ll long long int #define ul unsigned long long int #define va vector<long long int> a #define vb vector<long long int> b #define M 1000000007 using namespace std; ll t; void fast() { cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0); } ll power(ll x, ul y, ll p) { ll res = 1...
#include <bits/stdc++.h> #define ll long long int #define ul unsigned long long int #define va vector<long long int> a #define vb vector<long long int> b #define M 1000000007 using namespace std; ll t; void fast() { cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0); } ll power(ll x, ul y, ll p) { ll res = 1...
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
201
#include <iostream> using namespace std; int main() { long long int x; cin >> x; long long int sum = 100; long long int cnt = 0; while (sum <= x) { sum *= 1.01; cnt++; } cout << cnt << endl; return 0; }
#include <iostream> using namespace std; int main() { long long int x; cin >> x; long long int sum = 100; long long int cnt = 0; while (sum < x) { sum *= 1.01; cnt++; } cout << cnt << endl; return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
59
import math a=int(input()) b=100 ans=0 while(1): b += math.floor(b*0.01) ans +=1 if(b>a): break print(ans)
import math a=int(input()) b=100 ans=0 while(1): b += math.floor(b*0.01) ans +=1 if(b>=a): break print(ans)
[["-", 8, 196, 0, 57, 15, 23, 0, 666, 667, 47], ["+", 8, 196, 0, 57, 15, 23, 0, 666, 667, 20]]
5
46
x = int(input()) a = 100 y = 0 while x >= a: a = int(a*101/100) y = y+1 print(y)
x = int(input()) a = 100 y = 0 while x > a: a = int(a*101/100) y = y+1 print(y)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 20], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 47]]
5
38
#include <cmath> #include <iostream> using namespace std; int main() { long long x; cin >> x; long long p = 100, amount = 100; int t = 0; while (amount <= x) { if (amount >= x) break; t++; amount = floor(100 * pow(1.01, t)); } cout << t << endl; return 0; }
#include <cmath> #include <iostream> using namespace std; int main() { long long x; cin >> x; long long p = 100, amount = 100; int t = 0; while (amount <= x) { if (amount >= x) break; t++; amount = floor(p * pow(1.01, 1)); p = amount; } cout << t << endl; return 0; }
[["-", 0, 11, 12, 2, 3, 4, 0, 16, 31, 13], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 31, 22], ["-", 3, 4, 0, 16, 12, 2, 3, 4, 0, 22], ["+", 3, 4, 0, 16, 12, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12...
1
79
a = gets.to_i b = 100 c = 0 while a >= b c += 1 b = b * 101 / 100 end puts c
a = gets.to_i b = 100 c = 0 while a > b c += 1 b = b * 101 / 100 end puts c
[["-", 36, 36, 0, 493, 0, 89, 15, 738, 17, 20], ["+", 36, 36, 0, 493, 0, 89, 15, 738, 17, 47]]
4
28
#include <stdio.h> int main() { long long int x, p = 100, count = 0; scanf("%lld", &x); while (1) { p = p + p * 0.01; count++; if (p > x) break; } printf("%lld", count); return 0; }
#include <stdio.h> int main() { long long int x, p = 100, count = 0; scanf("%lld", &x); while (1) { p = p + p * 0.01; count++; if (p >= x) break; } printf("%lld", count); return 0; }
[["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 20]]
0
68
x = int(input()) m = 100 i = 0.01 y = 0 flag = True while flag: m = math.floor(m*(1+i)) y += 1 if m >= x: break print(y)
import math x = int(input()) m = 100 i = 0.01 y = 0 flag = True while flag: m = math.floor(m*(1+i)) y += 1 if m >= x: break print(y)
[["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]]
5
50
X = int(input()) yen = 100 i = 0 def rishi(yen): return int(yen * 1.01) while 1: i += 1 yen = rishi(yen) if X < yen: break print(i)
X = int(input()) yen = 100 i = 0 def rishi(yen): return int(yen * 1.01) while 1: i += 1 yen = rishi(yen) if X <= yen: break print(i)
[["-", 0, 52, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 667, 19]]
5
49
function main(input) { let val = 100; let a = 1; while (true) { val += Math.floor(val * 0.01) if (val >= input) { console.log(a); break; } } } main(require('fs').readFileSync('/dev/stdin', 'utf8'));
function main(input) { let val = 100; let a = 1; while (true) { val += Math.floor(val * 0.01) if (val >= input) { console.log(a); break; } a += 1; } } main(require('fs').readFileSync('/dev/stdin', 'utf8'));
[["+", 0, 52, 8, 556, 0, 1, 0, 564, 31, 22], ["+", 0, 52, 8, 556, 0, 1, 0, 564, 17, 107], ["+", 0, 52, 8, 556, 0, 1, 0, 564, 12, 555], ["+", 8, 556, 0, 52, 8, 556, 0, 1, 0, 35]]
2
71
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i) #define REPR(i, n) for (ll i = n; i >= 0; --i) #define FOR(i, m, n) for (ll i = m, i##_len = (n); i < i##_len; ++i) #define all(x) (x).begin(), (x).end() template <class T> inline bool c...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i) #define REPR(i, n) for (ll i = n; i >= 0; --i) #define FOR(i, m, n) for (ll i = m, i##_len = (n); i < i##_len; ++i) #define all(x) (x).begin(), (x).end() template <class T> inline bool c...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 25]]
1
208
// https://atcoder.jp/contests/abc165/tasks/abc165_b #include <bits/stdc++.h> using namespace std; #define int long long #define REP(i, n) FOR(i, 0, n) #define REPR(i, n) for (int i = n - 1; i >= 0; i--) #define FOR(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; ++i) #define ALL(obj) (obj).begin(), (obj).end() ...
// https://atcoder.jp/contests/abc165/tasks/abc165_b #include <bits/stdc++.h> using namespace std; #define int long long #define REP(i, n) FOR(i, 0, n) #define REPR(i, n) for (int i = n - 1; i >= 0; i--) #define FOR(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; ++i) #define ALL(obj) (obj).begin(), (obj).end() ...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
116
#include <bits/stdc++.h> using namespace std; // in-short-use macros #define all(c) (c).begin(), (c).end() #define ll long long int #define ld long double #define pb push_back #define mp make_pair #define ff first #define ss second #define mod 1000000007 #define PI 3.14159265 #define sizes 1000010 // main function h...
#include <bits/stdc++.h> using namespace std; // in-short-use macros #define all(c) (c).begin(), (c).end() #define ll long long int #define ld long double #define pb push_back #define mp make_pair #define ff first #define ss second #define mod 1000000007 #define PI 3.14159265 #define sizes 1000010 // main function h...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
145
#include <bits/stdc++.h> #define lint long long int #define sudo std:: #define girdi freopen("motor.gir", "r", stdin); #define cikti freopen("motor.cik", "w", stdout); #define faster \ ios_base::sync_with_stdio(0); ...
#include <bits/stdc++.h> #define lint long long int #define sudo std:: #define girdi freopen("motor.gir", "r", stdin); #define cikti freopen("motor.cik", "w", stdout); #define faster \ ios_base::sync_with_stdio(0); ...
[["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78], ["+", 0, 1, 0, 11, 12, 16, 12, 74, 0, 24], ["+", 0, 11, 12, 16, 12, 74, 39, 77, 39, 78], ["+", 0, 1, 0, 11, 12, 16, 12, 74, 0, 25]]
1
283
a=int(input()) m=100 c=0 for i in range(2000): m=int(m*1.01) c=c+1 if m >= a: break print(c)
a=int(input()) m=100 c=0 for i in range(4000): m=int(m*1.01) c=c+1 if m >= a: break print(c)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]]
5
45
#include <bits/stdc++.h> using namespace std; int main() { long long B, X, i; long double A; cin >> X; A = 100; i = 0; while (A <= X) { B = (A * 0.01); A = A + B; i++; } cout << i << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long B, X, i; long double A; cin >> X; A = 100; i = 0; while (A < X) { B = (A * 0.01); A = A + B; i++; } cout << i << endl; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
67
#include <stdio.h> int main() { unsigned long A, B; int count; B = 100; A = 0; count = 0; scanf("%d", &A); while (1) { count++; B = B * 1.01; if (B >= A) { printf("%d", count); break; } } return 0; }
#include <stdio.h> int main() { unsigned long A, B; int count; B = 100; A = 0; count = 0; scanf("%lu", &A); while (1) { count++; B = B * 1.01; if (B >= A) { printf("%d", count); break; } } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
76
X = int(input()) b = 100 ans = 0 while b <= X: b += int(b*0.01) ans += 1 print(ans)
X = int(input()) b = 100 ans = 0 while b < X: b += int(b*0.01) ans += 1 print(ans)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18]]
5
34
#include <iostream> #include <string> #include <vector> using namespace std; int main() { unsigned long long int x; cin >> x; int i = 1; int a = 101; for (; a < x; i++) { a = 1.01 * a; } cout << i << endl; return 0; }
#include <iostream> #include <string> #include <vector> using namespace std; int main() { unsigned long long int x; cin >> x; int i = 1; unsigned long long int a = 101; for (; a < x; i++) { a = 1.01 * a; } cout << i << endl; return 0; }
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 87], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
63
#include <iostream> using namespace std; int main() { double num; cin >> num; int i = 0; double ans = 100; do { ans *= 1.01; ans = (long long)ans; i++; } while (ans <= num); cout << i << endl; return 0; }
#include <iostream> using namespace std; int main() { long long num; cin >> num; int i = 0; double ans = 100; do { ans *= 1.01; ans = (long long)ans; i++; } while (ans < num); 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], ["-", 8, 9, 0, 82, 15, 23, 0, 16, 17, 19], ["+", 8, 9, 0, 82, 15, 23, 0, 16, 17, 18]]
1
63
#include <stdio.h> int main() { long int X, z; z = 100; int i; scanf("%ld", &X); for (i = 1; i < 4000; i++) { z = z + z * i / 100; if (z >= X) { printf("%d", i); break; } } return 0; }
#include <stdio.h> int main() { long int X, z; z = 100; int i; scanf("%ld", &X); for (i = 1; i < 4000; i++) { z = z + z / 100; if (z >= X) { printf("%d", i); break; } } return 0; }
[["-", 0, 11, 12, 16, 12, 16, 31, 16, 17, 48], ["-", 0, 11, 12, 16, 12, 16, 31, 16, 12, 22]]
0
78
#include <bits/stdc++.h> #define int long long #define fast \ ios_base::sync_with_stdio(false); \ cin.tie(0); #define rep(i, a, n) for (int i = a; i < n; i++) #define all(x) x.begin(), x.end() #define vi ve...
#include <bits/stdc++.h> #define int long long #define fast \ ios_base::sync_with_stdio(false); \ cin.tie(0); #define rep(i, a, n) for (int i = a; i < n; i++) #define all(x) x.begin(), x.end() #define vi ve...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
149
// It will be AC.I'm sure. #include <bits/stdc++.h> using namespace std; int main() { long long k, ba = 100; cin >> k; for (long long t = 1;; t++) { ba = ba + ba / 100; // cout<<ba<<" "; if (ba + 100 >= k) { cout << t; return 0; } } return 0; }
// It will be AC.I'm sure. #include <bits/stdc++.h> using namespace std; int main() { long long k, ba = 100; cin >> k; for (long long t = 1;; t++) { ba = ba + ba / 100; // cout<<ba<<" "; if (ba >= k) { cout << t; return 0; } } return 0; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
68
x=int(input()) m=100 ans=0 while m<=x: m=int(m*1.01) ans+=1 print(ans)
x=int(input()) m=100 ans=0 while m<x: m=int(m*1.01) ans+=1 print(ans)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18]]
5
34
x=gets.to_i i=100 c=0 while i < x do i = i*1.01 c += 1 end puts c
x=gets.to_i i=100 c=0 while i < x do i = (i*1.01).floor c += 1 end puts c
[["+", 8, 170, 0, 662, 12, 652, 486, 739, 0, 24], ["+", 8, 170, 0, 662, 12, 652, 486, 739, 0, 25], ["+", 0, 89, 8, 170, 0, 662, 12, 652, 17, 131], ["+", 0, 89, 8, 170, 0, 662, 12, 652, 735, 22]]
4
27
#include <stdio.h> int main() { unsigned long int base = 100; unsigned long int x = 100; int count = 0; scanf("%d", &x); while (base < x) { base = base + (base / 100); count++; } printf("%d", count); }
#include <stdio.h> int main() { long int base = 100; long int x = 100; int count = 0; scanf("%ld", &x); while (base < x) { base = base + (base / 100); count++; } printf("%d", count); }
[["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 87], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
67
#include <iostream> using namespace std; int main() { unsigned long long a, b; cin >> a; int c = 100; b = 0; while (c < a) { c = c + c / 100; b++; } cout << b; return 0; }
#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; }
[["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 87], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 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, 43, 39, 86, 0, 96]]
1
58
x = int(input()); count = 0; v = 100; while(v <= x): r = int(v * 0.01); v += r; count += 1; print(count);
x = int(input()); count = 0; v = 100; while(v < x): r = int(v * 0.01); v += r; count += 1; print(count);
[["-", 0, 656, 0, 52, 15, 23, 0, 666, 667, 19], ["+", 0, 656, 0, 52, 15, 23, 0, 666, 667, 18]]
5
46
#include <stdio.h> long long k, s = 100; int i, j, n, m, ans = 0; int main() { scanf("%lld", &k); while (s <= k) { s = s + s * 0.01; ans++; } printf("%d", ans); return 0; }
#include <stdio.h> long long k, s = 100; int i, j, n, m, ans = 0; int main() { scanf("%lld", &k); while (s < k) { s = s + s * 0.01; ans++; } printf("%d\n", ans); return 0; }
[["-", 8, 9, 0, 52, 15, 23, 0, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 23, 0, 16, 17, 18], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
0
70
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; long long a = 100; long long ans = 0; while (1) { a = a + a / 100; ans++; if (a > x) break; } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; long long a = 100; long long ans = 0; while (1) { a = a + a / 100; ans++; if (x <= a) break; } cout << ans << endl; return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]]
1
66
#include <bits/stdc++.h> #include <cmath> #include <math.h> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vl = vector<ll>; using vvl = vector<vl>; using vs = vector<string>; using vvs = vector<vs>; using vc = vector<char>; using vvc = vector<vc>; using vb = vector<boo...
#include <bits/stdc++.h> #include <cmath> #include <math.h> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vl = vector<ll>; using vvl = vector<vl>; using vs = vector<string>; using vvs = vector<vs>; using vc = vector<char>; using vvc = vector<vc>; using vb = vector<boo...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
734
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { double X; cin >> X; double p = 100; double counter = 0; double amount = 100; while (X >= amount) { amount = floor(amount * 1.01); counter++; } cout << counter << "\n"; return 0; }
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { double X; cin >> X; double p = 100; double counter = 0; long long amount = 100; while (X > amount) { amount = (amount * 1.01); counter++; } cout << counter << "\n"; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["-", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22]]
1
74
#include <bits/stdc++.h> using namespace std; int main(void) { int X, i; int64_t sum, hun; sum = 100; hun = 100; i = 0; cin >> X; if (X < 100508083) { while (sum < X) { sum += sum / hun; i++; } } else { i = 1446; sum = 100508083; while (sum < X) { sum += sum / h...
#include <bits/stdc++.h> using namespace std; int main(void) { int i; int64_t sum, hun, X; sum = 100; hun = 100; i = 0; cin >> X; if (X < 100508083) { while (sum < X) { sum += sum / hun; i++; } } else { i = 1446; sum = 100508083; while (sum < X) { sum += sum / h...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22]]
1
101
#include <bits/stdc++.h> using namespace std; int main() { int64_t X; cin >> X; int64_t A = 100; int count = 0; while (A <= X) { A *= 1.01; count++; } cout << count; }
#include <bits/stdc++.h> using namespace std; int main() { int64_t X; cin >> X; int64_t A = 100; int count = 0; while (A < X) { A *= 1.01; count++; } cout << count; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
48
#include <bits/stdc++.h> using namespace std; int main() { long long x, y; int i = 0; cin >> x; y = 100; while (y < x) { y *= 1.1; i++; } cout << i << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long x, y; int i = 0; cin >> x; y = 100; while (y < x) { y *= 1.01; i++; } cout << i << endl; }
[["-", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13]]
1
52
import math def main(): X = int(input()) money = 100 n = 0 while(money<=X): n += 1 money = math.floor(money * 1.01) print(n) if __name__ == "__main__": main() pass
import math def main(): X = int(input()) money = 100 n = 0 while(money<X): n += 1 money = math.floor(money * 1.01) print(n) if __name__ == "__main__": main() pass
[["-", 8, 196, 0, 52, 15, 23, 0, 666, 667, 19], ["+", 8, 196, 0, 52, 15, 23, 0, 666, 667, 18]]
5
56
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); double number = Double.parseDouble(s.next()); double base = 100; int count = 0; while (number >= base) { base *= 1.01; base = Math.floor(base); count++; } ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); double number = Double.parseDouble(s.next()); double base = 100; int count = 0; while (number > base) { base *= 1.01; base = Math.floor(base); count++; } ...
[["-", 8, 196, 0, 52, 15, 15, 0, 16, 17, 20], ["+", 8, 196, 0, 52, 15, 15, 0, 16, 17, 47]]
3
92
// include //------------------------------------------ #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include...
// include //------------------------------------------ #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
437
def over(X, start=100): i = 0 current = start while True: i += 1 current += current // 100 if current > X: return i def main(): X = int(input()) result = over(X, 100) print(result) if __name__ == '__main__': main()
def over(X, start=100): i = 0 current = start while True: i += 1 current += current // 100 if current >= X: return i def main(): X = int(input()) result = over(X, 100) print(result) if __name__ == '__main__': main()
[["-", 0, 52, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 667, 20]]
5
69
#include <iostream> #include <math.h> #include <string> #include <vector> #define LL long long #define MOD 1000000007 #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int main() { LL X; cin >> X; LL yokin = 100; int ans = 0; while (1) { ans++; yokin *= 1.01; if (X < yokin) ...
#include <iostream> #include <math.h> #include <string> #include <vector> #define LL long long #define MOD 1000000007 #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int main() { LL X; cin >> X; LL yokin = 100; int ans = 0; while (1) { ans++; yokin += yokin * 0.01; if (X <...
[["-", 0, 52, 8, 9, 0, 1, 0, 11, 17, 108], ["-", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 52, 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, 48], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, ...
1
79
num = int(input()) year = 0 cash = 100 while(True): cash += int(cash/100) year+=1 if(num < cash): print(year) break
num = int(input()) year = 0 cash = 100 while(True): cash += int(cash/100) year+=1 if(num <= cash): print(year) break
[["-", 8, 196, 0, 57, 15, 23, 0, 666, 667, 18], ["+", 8, 196, 0, 57, 15, 23, 0, 666, 667, 19]]
5
42
x = int(input()) wk =100 i=0 while x >wk: wk += wk*0.01 i+=1 print(i)
x = int(input()) wk =100 i=0 while x >wk: wk += int(wk*0.01) i+=1 print(i)
[["+", 8, 196, 0, 1, 0, 677, 12, 652, 63, 22], ["+", 0, 1, 0, 677, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 677, 12, 652, 3, 4, 0, 25]]
5
31
#include <bits/stdc++.h> using namespace std; int main() { int X, A, B; A = 100; cin >> X; for (int i = 1; i < 3761; i++) { B = A * 101 / 100; A = B; if (A >= X) { cout << i << endl; break; } } }
#include <bits/stdc++.h> using namespace std; int main() { double X, A, B; A = 100; cin >> X; for (int i = 1; i < 3780; i++) { B = floor(A * 101 / 100); A = B; if (A >= X) { cout << i << endl; break; } } }
[["-", 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, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 25]]
1
71
import java.util.Scanner; public class Main { static long X; static int m = 0; static long a = 100; static boolean n = true; public static void main(String[] args) { Scanner sc = new Scanner(System.in); X = sc.nextLong(); while (X >= a) { m = m + 1; a = a / 100 + a; } System.o...
import java.util.Scanner; public class Main { static long X; static int m = 0; static long a = 100; static boolean n = true; public static void main(String[] args) { Scanner sc = new Scanner(System.in); X = sc.nextLong(); while (X > a) { m = m + 1; a = a / 100 + a; } System.ou...
[["-", 8, 196, 0, 52, 15, 15, 0, 16, 17, 20], ["+", 8, 196, 0, 52, 15, 15, 0, 16, 17, 47]]
3
96
x = int(input()) t, ans = 100, 0 while t < x: t += int(t * (1.01)) ans += 1 print(ans)
x = int(input()) t, ans = 100, 0 while t < x: t = int(t * (1.01)) ans += 1 print(ans)
[["-", 0, 52, 8, 196, 0, 1, 0, 677, 17, 107], ["+", 0, 52, 8, 196, 0, 1, 0, 662, 0, 32]]
5
37
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ll long long int main() { ll x; ll kane = 100; cin >> x; ll cnt = 0; while (1) { cnt++; kane += kane / 100; if (kane > x) break; } cout << cnt << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ll long long int main() { ll x; ll kane = 100; cin >> x; ll cnt = 0; while (1) { cnt++; kane += kane / 100; if (kane >= x) break; } cout << cnt << endl; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
69
import math X=int(input()) money = 100 ans = 0 while money <= X: money += math.floor(money * 0.01) ans += 1 print(ans)
import math X=int(input()) money = 100 ans = 0 while money < X: money += math.floor(money * 0.01) ans += 1 print(ans)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18]]
5
38
X = int(input()) money = 100 year = 0 while money <= X: money += int(money*0.01) year += 1 else: print(year)
X = int(input()) money = 100 year = 0 while money < X: money += int(money*0.01) year += 1 else: print(year)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18]]
5
36
#include <algorithm> #include <cmath> #include <functional> #include <iostream> #include <numeric> #include <string> #include <vector> #define REP(i, n) for (ll i = 0; i < n; i++) #define REPR(i, n) for (ll i = n; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i < n; i++) //#define INF 2e9 #define ALL(v) v.begin(), ...
#include <algorithm> #include <cmath> #include <functional> #include <iostream> #include <numeric> #include <string> #include <vector> #define REP(i, n) for (ll i = 0; i < n; i++) #define REPR(i, n) for (ll i = n; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i < n; i++) //#define INF 2e9 #define ALL(v) v.begin(), ...
[["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 19]]
1
146
import math def main(): X = input() X = int(X) output = 100 year = 0 while output <= X: output = int(output * 1.01) math.floor(output) year += 1 print(year) if __name__ == "__main__": main()
import math def main(): X = input() X = int(X) output = 100 year = 0 while output < X: output = int(output * 1.01) math.floor(output) year += 1 print(year) if __name__ == "__main__": main()
[["-", 0, 14, 8, 196, 0, 52, 15, 666, 667, 19], ["+", 0, 14, 8, 196, 0, 52, 15, 666, 667, 18]]
5
60
#include <bits/stdc++.h> using namespace std; int main() { long long X; cin >> X; long long money = 100; long long count = 1; while (true) { money *= 1.01; if (money - 100 >= X) { cout << count << endl; break; } count++; } }
#include <bits/stdc++.h> using namespace std; int main() { long long X; cin >> X; long long money = 100; long long count = 1; while (true) { money *= 1.01; if (money >= X) { cout << count << endl; break; } count++; } }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
63
#include "bits/stdc++.h" using namespace std; int main() { unsigned long long int x; unsigned long long int n = 100; int count = 0; cin >> x; while (n <= x) { n = n * 1.01; count++; } cout << count; }
#include "bits/stdc++.h" using namespace std; int main() { unsigned long long int x; unsigned long long int n = 100; int count = 0; cin >> x; while (n < x) { n = n * 1.01; count++; } cout << count; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
58
#include <bits/stdc++.h> using namespace std; int main() { int n = 100, x, m = 0; cin >> x; while (n < x) { n += n / 100; m++; } cout << m; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long n = 100, x, m = 0; cin >> x; while (n < x) { n += n / 100; m++; } cout << m; return 0; }
[["-", 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 IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define endl "\n...
#include <bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define endl "\n...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
149
#include <stdio.h> int main() { long int X; double m = 100; scanf("%ld", &X); int cnt = 0; while (m < X) { m += m * 0.01; cnt += 1; } printf("%d", cnt); return 0; }
#include <stdio.h> int main() { long int X; long int m = 100; scanf("%ld", &X); int cnt = 0; while (m < X) { m += m * 0.01; cnt += 1; } printf("%d", cnt); 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, 43, 39, 86, 39, 40]]
0
62
/* @uthor: Amit Kumar user: CodeChef: dr_virus_ ; Codeforces,Hackerearth,Hakerrank: dr_virus; */ #include <bits/stdc++.h> using namespace std; //#include <boost/multiprecision/cpp_int.hpp> // namespace mp = boost::multiprecision; //#define ln mp::cpp_int; #define ll long long #define ld double #define endl "\n"...
/* @uthor: Amit Kumar user: CodeChef: dr_virus_ ; Codeforces,Hackerearth,Hakerrank: dr_virus; */ #include <bits/stdc++.h> using namespace std; //#include <boost/multiprecision/cpp_int.hpp> // namespace mp = boost::multiprecision; //#define ln mp::cpp_int; #define ll long long #define ld double #define endl "\n"...
[["-", 8, 9, 0, 52, 8, 9, 0, 43, 39, 78], ["+", 8, 9, 0, 52, 8, 9, 0, 43, 39, 78]]
1
143
x = gets.to_i a = 100 ans = 0 while a <= x do a = (a * 1.01).floor ans += 1 end p ans
x = gets.to_i a = 100 ans = 0 while a < x do a = (a * 1.01).floor ans += 1 end p ans
[["-", 36, 36, 0, 493, 0, 89, 15, 738, 17, 19], ["+", 36, 36, 0, 493, 0, 89, 15, 738, 17, 18]]
4
31
#include <bits/stdc++.h> using namespace std; int main() { long long k, ans; cin >> k; ans = 0; long long sum = 100; while (sum <= k) { sum = (long long)sum * 1.01; ans++; } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long k, ans; cin >> k; ans = 1; long long sum = 101; while (sum < k) { sum = (long long)sum * 1.01; ans++; } cout << ans << endl; }
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
59
#include <stdio.h> int main(void) { unsigned long long int x = 0; unsigned long long int y = 100; unsigned long int cnt = 0; scanf("%d", &x); while (y < x) { y += y * 0.01; // printf("%d\n",y); cnt += 1; } printf("%d", cnt); return 0; }
#include <stdio.h> int main(void) { unsigned long long int x = 0; unsigned long long int y = 100; unsigned long int cnt = 0; scanf("%lld", &x); while (y < x) { y += y * 0.01; // printf("%d\n",y); cnt += 1; } printf("%ld", cnt); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
73
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> using namespace std; const int maxn = 1e5 + 7; const int inf = 0x3f3f3f3f; const int mod = 1e9 + 7; const double pi = acos(-1.0); typedef long long ll; ll a =...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> using namespace std; const int maxn = 1e5 + 7; const int inf = 0x3f3f3f3f; const int mod = 1e9 + 7; const double pi = acos(-1.0); typedef long long ll; ll a =...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
116
#include <bits/stdc++.h> #include <iostream> #include <math.h> #include <string> using namespace std; int main() { int x; cin >> x; long int i; double deposit = 100.0; for (i = 1; i <= 1000000000000000000; i++) { deposit = floor(deposit * 1.01); if (deposit >= x) { cout << i << endl; brea...
#include <bits/stdc++.h> #include <iostream> #include <math.h> #include <string> using namespace std; int main() { long int x; cin >> x; long int i; double deposit = 100.0; for (i = 1; i <= 1000000000000; i++) { deposit = floor(deposit * 1.01); if (deposit >= x) { cout << i << endl; break...
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
77
import math x=int(input()) ans=100 for n in range(1,10**5+1): ans *= (1.01) ans = math.floor(ans) if ans>=x: print(n,ans) exit()
import math x=int(input()) ans=100 for n in range(1,10**5+1): ans *= (1.01) ans = math.floor(ans) if ans>=x: print(n) exit()
[["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22]]
5
54
import math x = int(input()) d = 100 a = 0 while x >= d: d += math.floor(d*0.01) a += 1 print(a)
import math x = int(input()) d = 100 a = 0 while x > d: d += math.floor(d*0.01) a += 1 print(a)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 20], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 47]]
5
38
a = gets.chomp.to_i sum = 100.to_f year = 0 while true do break if a < sum sum *= 1.01 sum = sum.floor year += 1 end puts year
a = gets.chomp.to_i sum = 100.to_f year = 0 while true do break if a <= sum sum *= 1.01 sum = sum.floor year += 1 end puts year
[["-", 0, 89, 8, 170, 0, 751, 15, 738, 17, 18], ["+", 0, 89, 8, 170, 0, 751, 15, 738, 17, 19]]
4
37
import math n = int(input()) cash = 100 count = 0 while n >= cash: cash = cash + math.floor(cash * 0.01) count += 1 print(count)
import math n = int(input()) cash = 100 count = 0 while n > cash: cash = cash + math.floor(cash * 0.01) count += 1 print(count)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 20], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 47]]
5
40
import math x=int(input()) a=100 cnt=0 while a<x: a*=1.01 cnt+=1 a=int(a) print(a) print(cnt)
import math x=int(input()) a=100 cnt=0 while a<x: a*=1.01 cnt+=1 a=int(a) print(cnt)
[["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24]]
5
41
#include <bits/stdc++.h> using namespace std; int t, x, z; int main() { double y = 100; cin >> x; while (++z) { if (y >= x) { cout << z - 1 << "\n"; exit(0); } y *= 1.01; y = floor(y); } return 0; }
#include <bits/stdc++.h> using namespace std; long long t, x, z; int main() { double y = 100; cin >> x; while (++z) { if (y >= x) { cout << z - 1 << "\n"; exit(0); } y *= 1.01; y = floor(y); } return 0; }
[["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 0, 30, 0, 43, 39, 86, 0, 96]]
1
72
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long long int lli; typedef vector<ll> vl; #define pb push_back #define mp make_pair #define ff first #define ss second #define SQR(x) ((x) * (x)) #define loop(i, y) for (int i = 0; i < int(y); i++) #define FOR...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long long int lli; typedef vector<ll> vl; #define pb push_back #define mp make_pair #define ff first #define ss second #define SQR(x) ((x) * (x)) #define loop(i, y) for (int i = 0; i < int(y); i++) #define FOR...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
817