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 <bits/stdc++.h> #define SZ(X) ((int)(X).size()) #define ALL(X) (X).begin(), (X).end() #define REP(I, N) for (int I = 0; I < (N); ++I) #define REPP(I, A, B) for (int I = (A); I < (B); ++I) #define FOR(I, A, B) for (int I = (A); I <= (B); ++I) #define FORS(I, S) for (int I = 0; S[I]; ++I) #define RS(X) s...
/*{{{*/ #include <bits/stdc++.h> #define SZ(X) ((int)(X).size()) #define ALL(X) (X).begin(), (X).end() #define REP(I, N) for (int I = 0; I < (N); ++I) #define REPP(I, A, B) for (int I = (A); I < (B); ++I) #define FOR(I, A, B) for (int I = (A); I <= (B); ++I) #define FORS(I, S) for (int I = 0; S[I]; ++I) #define RS(X) s...
[["-", 3, 4, 0, 69, 341, 342, 0, 118, 119, 120], ["+", 3, 4, 0, 69, 341, 342, 0, 118, 119, 120]]
1
1,515
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define all(v) v.begin(), v.end() #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define Rep(n) for (ll _ = 0; _ < (ll)(n); _++) #define fs first #define sc second #define _GLIBCXX_DEBUG template <class S> S sum(vector<S> &...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define all(v) v.begin(), v.end() #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define Rep(n) for (ll _ = 0; _ < (ll)(n); _++) #define fs first #define sc second #define _GLIBCXX_DEBUG template <class S> S sum(vector<S> &...
[["-", 64, 1, 0, 16, 12, 2, 3, 4, 0, 22], ["+", 64, 1, 0, 16, 12, 2, 3, 4, 0, 22], ["-", 0, 1, 0, 16, 12, 2, 3, 4, 0, 22], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 22]]
1
1,003
X = [0, 0, 0] N, X[0], X[1], X[2] = map(int, input().split()) Q = [] for _ in range(N): s = input() if s == 'AB': Q.append([0, 1]) elif s == 'AC': Q.append([0, 2]) else: Q.append([1, 2]) ans = True ret = '' for i in range(N): a = Q[i][0] b = Q[i][1] if X[a] == X[b] ==...
X = [0, 0, 0] N, X[0], X[1], X[2] = map(int, input().split()) Q = [] for _ in range(N): s = input() if s == 'AB': Q.append([0, 1]) elif s == 'AC': Q.append([0, 2]) else: Q.append([1, 2]) ans = True ret = '' for i in range(N): a = Q[i][0] b = Q[i][1] if X[a] == X[b] ==...
[["-", 0, 7, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
5
371
#include <bits/stdc++.h> using namespace std; long long n, d[3] = {}, sum; string res; vector<string> s; bool solve(); int main() { cin >> n; for (int i = 0; i < 3; ++i) cin >> d[i]; s.resize(n); for (int i = 0; i < n; ++i) cin >> s[i]; if (solve()) { cout << "Yes" << endl; for (int i = 0; ...
#include <bits/stdc++.h> using namespace std; long long n, d[3] = {}, sum; string res; vector<string> s; bool solve(); int main() { cin >> n; for (int i = 0; i < 3; ++i) cin >> d[i]; s.resize(n); for (int i = 0; i < n; ++i) cin >> s[i]; if (solve()) { cout << "Yes" << endl; for (int i = 0; ...
[["+", 12, 16, 31, 69, 341, 342, 0, 16, 31, 13], ["+", 12, 16, 31, 69, 341, 342, 0, 16, 17, 33]]
1
414
n,a,b,c = map(int,input().split()) flag = True ans = [] s = [] for i in range(n): s.append(input()) for i in range(n): if s[i] == "AB": if a == 0 and b == 0: flag = False if a > b: a -= 1 b += 1 ans.append("B") elif b < a: a += ...
n,a,b,c = map(int,input().split()) flag = True ans = [] s = [] for i in range(n): s.append(input()) for i in range(n): if s[i] == "AB": if a == 0 and b == 0: flag = False if a > b: a -= 1 b += 1 ans.append("B") elif b > a: a += ...
[["-", 64, 196, 0, 57, 75, 665, 15, 666, 667, 18], ["+", 64, 196, 0, 57, 75, 665, 15, 666, 667, 47]]
5
444
N,A,B,C=map(int,input().split()) S=[input() for _ in range(N)] ans='' for i in range(N): if S[i]=='AB': if A==0 and B==0: print('No') exit() elif A==1 and B==0: A-=1 B+=1 ans+='B' elif A==0 and B==1: A+=1 B-=...
N,A,B,C=map(int,input().split()) S=[input() for _ in range(N)] ans='' for i in range(N): if S[i]=='AB': if A==0 and B==0: print('No') exit() elif A==1 and B==0: A-=1 B+=1 ans+='B' elif A==0 and B==1: A+=1 B-=...
[["+", 64, 196, 0, 57, 15, 666, 0, 557, 0, 654], ["+", 64, 196, 0, 57, 15, 666, 0, 557, 0, 655]]
5
491
import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner stdIn = new Scanner(System.in); int N = stdIn.nextInt(); int A = stdIn.nextInt(); int B = stdIn.nextInt(); int C = stdIn.nextInt(); String s[] = new String[N]; char ans[] = new c...
import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner stdIn = new Scanner(System.in); int N = stdIn.nextInt(); int A = stdIn.nextInt(); int B = stdIn.nextInt(); int C = stdIn.nextInt(); String s[] = new String[N]; char ans[] = new c...
[["+", 8, 196, 0, 57, 64, 196, 0, 57, 0, 95], ["+", 0, 57, 64, 196, 0, 57, 75, 57, 0, 95]]
3
592
// Problem : F - Three Variables Game // Contest : AtCoder - AtCoder Beginner Contest 166 // URL : https://atcoder.jp/contests/abc166/tasks/abc166_f // Memory Limit : 1024 MB // Time Limit : 2000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) #include <bits/stdc++.h> using namespace std; int main(...
// Problem : F - Three Variables Game // Contest : AtCoder - AtCoder Beginner Contest 166 // URL : https://atcoder.jp/contests/abc166/tasks/abc166_f // Memory Limit : 1024 MB // Time Limit : 2000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) #include <bits/stdc++.h> using namespace std; int main(...
[["+", 51, 16, 31, 69, 341, 342, 0, 16, 17, 72], ["+", 51, 16, 31, 69, 341, 342, 0, 16, 12, 13]]
1
720
import bisect,sys import math from collections import deque def sRaw(): return input().rstrip("\r") def iRaw(): return int(input()) def ssRaw(): return input().split() def isRaw(): return list(map(int, ssRaw())) INF = 1 << 29 DIV = (10**9) + 7 def mod_inv_prime(a, mod=DIV): return pow(a, m...
import bisect,sys import math from collections import deque def sRaw(): return input().rstrip("\r") def iRaw(): return int(input()) def ssRaw(): return input().split() def isRaw(): return list(map(int, ssRaw())) INF = 1 << 29 DIV = (10**9) + 7 def mod_inv_prime(a, mod=DIV): return pow(a, m...
[["-", 64, 196, 0, 57, 75, 665, 15, 666, 0, 22], ["+", 64, 196, 0, 57, 75, 665, 15, 666, 0, 22]]
5
987
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef unsigned long long ull; ull B = 100000007; ll mod = 1000000007; int INF = 0x3f3f3f3f; int main() { int n; cin >> n; vector<int> aa(3); cin >> aa[0] >> aa[1] >> aa[2]; vector<string> str(n + 1); for (int i = 1; i <= n; ++i) { ci...
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef unsigned long long ull; ull B = 100000007; ll mod = 1000000007; int INF = 0x3f3f3f3f; int main() { int n; cin >> n; vector<int> aa(3); cin >> aa[0] >> aa[1] >> aa[2]; vector<string> str(n + 1); for (int i = 1; i <= n; ++i) { ci...
[["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 13]]
1
524
#include <bits/stdc++.h> #include <type_traits> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (n); ++i) #define rrep(i, n) for (int i = 1; i <= (n); ++i) #define drep(i, n) for (int i = (n)-1; i >= 0; --i) #define ddrep(i, n) for (int i = n; i > 0; --i) #define srep(i, s, t) for (in...
#include <bits/stdc++.h> #include <type_traits> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (n); ++i) #define rrep(i, n) for (int i = 1; i <= (n); ++i) #define drep(i, n) for (int i = (n)-1; i >= 0; --i) #define ddrep(i, n) for (int i = n; i > 0; --i) #define srep(i, s, t) for (in...
[["-", 51, 16, 12, 16, 12, 2, 63, 118, 28, 22], ["-", 51, 16, 12, 16, 12, 2, 63, 118, 17, 131], ["-", 51, 16, 12, 16, 12, 2, 63, 118, 119, 120], ["-", 51, 16, 12, 16, 12, 2, 3, 4, 0, 24], ["-", 51, 16, 12, 16, 12, 2, 3, 4, 0, 25], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, ...
1
711
from itertools import combinations N, A, B, C = map(int, input().split()) S = [input() for _ in range(N)] cnt = {'A': A, 'B': B, 'C': C} def out(T): now = {'A': A, 'B': B, 'C': C} ans = [] for i, s in enumerate(S): u, v = s[0], s[1] if now[u] == now[v] == 0: return [] ...
from itertools import combinations N, A, B, C = map(int, input().split()) S = [input() for _ in range(N)] cnt = {'A': A, 'B': B, 'C': C} def out(T): now = {'A': A, 'B': B, 'C': C} ans = [] for i, s in enumerate(S): u, v = s[0], s[1] if now[u] == now[v] == 0: return [] ...
[["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
5
312
#include <bits/stdc++.h> using namespace std; #define int long long #define endl '\n' #define pb push_back #define mp make_pair #define SPEED \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
#include <bits/stdc++.h> using namespace std; #define int long long #define endl '\n' #define pb push_back #define mp make_pair #define SPEED \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
[["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 79], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60]]
1
671
x = gets.to_i yokin = 100 count = 0 while yokin <= x yokin += (yokin * 0.01).floor count += 1 end puts count
x = gets.to_i yokin = 100 count = 0 while yokin < x yokin = yokin yokin += (yokin * 0.01).floor count += 1 end puts count
[["-", 36, 36, 0, 493, 0, 89, 15, 738, 17, 19], ["+", 36, 36, 0, 493, 0, 89, 15, 738, 17, 18], ["+", 0, 493, 0, 89, 8, 170, 0, 662, 31, 22], ["+", 0, 493, 0, 89, 8, 170, 0, 662, 0, 32], ["+", 0, 493, 0, 89, 8, 170, 0, 662, 12, 22]]
4
30
#include <iostream> using namespace std; int main() { long long X; cin >> X; long long year; long long A = 100; bool flag = true; while (flag) { if (A >= X) { flag = false; } A *= 1.01; year++; } cout << year - 1 << endl; }
#include <iostream> using namespace std; int main() { long long X; cin >> X; int year = 0; long long A = 100; bool flag = true; while (flag) { if (A >= X) { flag = false; } A *= 1.01; year++; } cout << year - 1 << endl; }
[["-", 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, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
68
import math x = int(input()) saving = 100 count = 0 while x >= saving: saving = math.floor(saving + saving * 0.01) count += 1 print(count)
import math x = int(input()) saving = 100 count = 0 while not x <= saving: saving = math.floor(saving + saving * 0.01) count += 1 print(count)
[["+", 36, 36, 0, 656, 0, 52, 15, 681, 0, 372], ["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 20], ["+", 0, 656, 0, 52, 15, 681, 28, 666, 667, 19]]
5
40
#include <cfenv> #include <cmath> #include <iostream> using namespace std; int main(void) { double X, Y; Y = 100; cin >> X; for (int i = 1;; i++) { Y += ceil(Y / 100); if (X <= Y) { cout << i << endl; return 0; } } }
#include <cfenv> #include <cmath> #include <iostream> using namespace std; int main(void) { double X, Y; Y = 100; cin >> X; for (int i = 1;; i++) { Y += floor(Y / 100); if (X <= Y) { cout << i << endl; return 0; } } }
[["-", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22]]
1
69
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; long long t = 100, dem = 0; while (t <= n) { t += (t / 100); dem++; } cout << dem; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; long long t = 100, dem = 0; while (t < n) { t += (t / 100); dem++; } cout << dem; return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
56
#include <bits/stdc++.h> using namespace std; int main() { int x; cin >> x; int o = 100, t = 0; while (o < x) { t++; o = o + o / 100; } cout << t; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long int x; cin >> x; long long int o = 100, t = 0; while (o < x) { t++; o = o + o / 100; } cout << t; return 0; }
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
54
X = list(map(int,input().split()))[0] yen = 100 for i in range(1,10**100): yen = int(yen*1.01) if yen > X: break print(i)
X = list(map(int,input().split()))[0] yen = 100 for i in range(1, 10**100): yen = int(yen*1.01) if yen >= X: break print(i)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]]
5
53
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ULL; int main() { long double X; cin >> X; ULL Y = 100, ans = 0; while (Y <= X) { Y *= 1.01; ans++; } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ULL; int main() { long double X; cin >> X; ULL Y = 100, ans = 0; while (Y < X) { Y *= 1.01; 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
56
X = int(input()) import math B = 0 A = 100 while A <= X: A = math.floor(A * 1.01) B += 1 print(B)
X = int(input()) import math B = 0 A = 100 while A < X: A = math.floor(A * 1.01) B += 1 print(B)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18]]
5
38
import math a = 100 n = 0 X = int(input()) while a <= X: n += 1 a = math.floor(a * 1.01) print(n)
import math a = 100 n = 0 X = int(input()) while a < X: n += 1 a = math.floor(a * 1.01) print(n)
[["-", 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> using namespace std; int main() { #define int long long int x; cin >> x; int a = 100; int count = 0; for (int i = 0; i < 4000; i++) { a = a * 101 / 100; count++; if (a >= x) { break; } } cout << count << endl; }
#include <bits/stdc++.h> using namespace std; int main() { #define int long long int x; cin >> x; int a = 100; int count = 0; for (int i = 0; i < 10000; i++) { a = a + a / 100; count++; if (a >= x) { break; } } cout << count << endl; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 17, 48], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 1, 0, 11, 12, 16, 12, 16, 31, 22]]
1
75
#include <iostream> #include <string> using namespace std; int main() { long long x, sum, y; cin >> x; sum = 100; y = 0; while (sum <= x) { sum = sum * 1.01; y++; } cout << y; }
#include <iostream> #include <string> using namespace std; int main() { long long x, sum, y; cin >> x; sum = 100; y = 0; while (sum < x) { sum = sum * 1.01; y++; } cout << y; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
55
X = int(input()) m = 100 y = 0 while True: if X <= m: break m = math.floor(m * 1.01) y += 1 print(y)
import math X = int(input()) m = 100 y = 0 while True: if X <= m: break m = math.floor(m * 1.01) y += 1 print(y)
[["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]]
5
40
#!/usr/bin/env python # -*- coding: utf-8 -*- import pysnooper # @pysnooper.snoop() from pprint import pprint as pp from pprint import pformat as pf import math if __name__ == '__main__': x = int(input()) money = 100 count = 0 while not (money >= x): money = math.floor(money * 101 / 100) ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from pprint import pprint as pp from pprint import pformat as pf import math if __name__ == '__main__': x = int(input()) money = 100 count = 0 while not (money >= x): money = math.floor(money * 101 / 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]]
5
67
import sys X = int(input()) A = 100 cnt = 0 while True: if A > X: print(cnt) sys.exit() A *= 1.01 A = int(A) cnt += 1
import sys X = int(input()) A = 100 cnt = 0 while True: if A >= X: print(cnt) sys.exit() A *= 1.01 A = int(A) cnt += 1
[["-", 0, 52, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 667, 20]]
5
45
account = start = 100 X = int(input()) i = 0 while account <= X: account = int(account * 1.01) i += 1 print(i)
account = start = 100 X = int(input()) i = 0 while account < X: account = int(account * 1.01) i += 1 print(i)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18]]
5
36
import math k=int(input()) #r = math.floor(t/100) t = 100 n = 0 while t<= k: t+=math.floor(t/100) n+=1 print(n)
import math k=int(input()) #r = math.floor(t/100) t = 100 n = 0 while t< k: t+=math.floor(t/100) n+=1 print(n)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18]]
5
39
N=int(input()) x=100.0 for i in range(N): x=math.floor(x*1.01) if(x>=N): print(i+1) break; i+=1
import math N=int(input()) x=100.0 for i in range(N): x=math.floor(x*1.01) if(x>=N): print(i+1) break; i+=1
[["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]]
5
47
#include <bits/stdc++.h> using namespace std; int main() { unsigned long long X; cin >> X; unsigned long long year = 0; long double amount = 100; while (true) { amount *= 1.01; ++year; if (amount > (long double)X) { break; } } cout << year; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { unsigned long long X; cin >> X; unsigned long long year = 0; long long amount = 100; while (true) { amount *= 1.01; ++year; if (amount >= X) { break; } } cout << year; return 0; }
[["-", 0, 14, 8, 9, 0, 43, 39, 86, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["-", 0, 57, 15, 339, 51, 16, 12, 74, 0, 24], ["-", 51, 16, 12, 74, 39, 77, 39, 86, 0, 96], ["-", 51, 16, 12, 74, 39, 77, 39, 86, 39, 40], ["-", 0, 57, 15, 339, 51, 16, 12, 74, 0, 25], ["+"...
1
68
#include <bits/stdc++.h> using namespace std; int main() { int N, M, K = 100; string S; cin >> N; int cnt = 0; while (K >= N) { cnt++; K *= 1.01; } cout << cnt << endl; } // cout<<"Yes"<<endl; // cout<<" No"<<endl; // cout<<" "<<endl; // if() ; // for(int i=0; i < N; i++){}
#include <bits/stdc++.h> using namespace std; int main() { long long int N, M, K = 100; string S; cin >> N; long long int cnt = 0; while (K < N) { cnt++; K *= 1.01; } cout << cnt << endl; }
[["+", 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, 18]]
1
59
#include <iostream> using namespace std; int main() { int year = 0; long long int money = 100, X; cin >> X; while (money <= X) { money = money * 1.01; year++; } cout << year << endl; }
#include <iostream> using namespace std; int main() { int year = 0; long long int money = 100, X; cin >> X; while (money < X) { money = money * 1.01; year++; } cout << year << endl; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
53
import math x=int(input()) a=100 i=0 while True: if a>=x: print(i) break i+=1 a*=1.01
import math x=int(input()) a=100 i=0 while True: if a>=x: print(i) break i+=1 a*=1.01 a=int(a)
[["+", 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
35
#include <stdio.h> #include <stdlib.h> int main(void) { long x; long money = 100; int cnt = 0; scanf("%ld", &x); while (money <= x) { money += money / 100; cnt++; } printf("%d\n", cnt); return (0); }
#include <stdio.h> #include <stdlib.h> int main(void) { long long x; long long money = 100; int cnt = 0; scanf("%lld", &x); while (money < x) { money += money / 100; cnt++; } printf("%d\n", cnt); return (0); }
[["+", 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], ["-", 8, 9, 0, 52, 15, 23, 0, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 23, 0, 16, 17, 18]]
0
66
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> long long int ans = 0; //最大公約数 long long int getgcd(long long n, long long m) { int r; if (n > m) { long long t = m; m = n; n = t; } while ((r = m % n) != 0) { m = n; n = r; }...
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> long long int ans = 0; //最大公約数 long long int getgcd(long long n, long long m) { int r; if (n > m) { long long t = m; m = n; n = t; } while ((r = m % n) != 0) { m = n; n = r; }...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 8, 9, 0, 7, 26, 11, 12, 2, 63, 22], ["+", 0, 7, 26, 11, 12, 2, 3, 4, 0, 24], ["+", 0, 7, 26, 11, 12, 2, 3, 4, 0, 25]]
0
263
#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...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
642
#include <bits/stdc++.h> #define F first #define S second #define pb push_back #define ll long long #define mp make_pair #define pii pair<int, int> #define mod 1000000007 #define M 1000000 using namespace std; void solve() { ll n; cin >> n; ll A; ll P = 100; int t = 1; while (true) { P = P * pow((1.0...
#include <bits/stdc++.h> #define F first #define S second #define pb push_back #define ll long long #define mp make_pair #define pii pair<int, int> #define mod 1000000007 #define M 1000000 using namespace std; void solve() { ll n; cin >> n; ll A; ll P = 100; int t = 1; while (true) { P = P * pow((1....
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
138
X = int(input()) t = 100 cnt = 0 while t <= X: t = t*1.01//1 cnt += 1 print(cnt)
X = int(input()) t = 100 cnt = 0 while t < X: t = t*1.01//1 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
33
#include <bits/stdc++.h> using namespace std; #define int long long #define endl "\n" #define P pair<int, int> #define dint long double const int mod = 998244353; inline int add(int a, int b) { int res = a + b; if (res >= mod) res -= mod; return res; } inline int sub(int a, int b) { int res = a - b; if ...
#include <bits/stdc++.h> using namespace std; #define int long long #define endl "\n" #define P pair<int, int> #define dint long double const int mod = 998244353; inline int add(int a, int b) { int res = a + b; if (res >= mod) res -= mod; return res; } inline int sub(int a, int b) { int res = a - b; if ...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
310
/* 我的心脏怦怦跳,监管者就在附近 name: Algorithm: writer:Lxs(cdx) place: nothing is impossible */ #pragma GCC optimize(3, "Ofast", "inline") #include <bits/stdc++.h> #include <cmath> #include <cstring> #include <iostream> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <unistd.h> #defin...
/* 我的心脏怦怦跳,监管者就在附近 name: Algorithm: writer:Lxs(cdx) place: nothing is impossible */ #pragma GCC optimize(3, "Ofast", "inline") #include <bits/stdc++.h> #include <cmath> #include <cstring> #include <iostream> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <unistd.h> #defin...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 87], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
138
import sys import math from collections import deque import heapq MAX_INT = int(10e10) MIN_INT = -MAX_INT mod = 1000000007 sys.setrecursionlimit(1000000) def IL(): return list(map(int,input().split())) def SL(): return input().split() def I(): return int(sys.stdin.readline()) def S(): return input() N = I() n = 100 a...
import sys import math from collections import deque import heapq MAX_INT = int(10e10) MIN_INT = -MAX_INT mod = 1000000007 sys.setrecursionlimit(1000000) def IL(): return list(map(int,input().split())) def SL(): return input().split() def I(): return int(sys.stdin.readline()) def S(): return input() N = I() n = 100 a...
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18]]
5
119
/* Author: Sanskar Agarwal Nick: sanskarag Birla Institute Of Technology, Mesra */ #include <bits/stdc++.h> using namespace std; #define ll long long int #define endl "\n" #define fast \ ios::sync_with_stdio(0); ...
/* Author: Sanskar Agarwal Nick: sanskarag Birla Institute Of Technology, Mesra */ #include <bits/stdc++.h> using namespace std; #define ll long long int #define endl "\n" #define fast \ ios::sync_with_stdio(0); ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 1, 0, 11, 12, 16, 12, 2, 63, 22], ["-", 0, 1, 0, 11, 12, 16, 12, 23, 0, 13], ["+", 12, 16, 12, 2, 3, 4, 0, 16, 31, 22], ["+", 12, 16, 12, 2, 3...
1
115
#include <bits/stdc++.h> using namespace std; int main() { long long int x, p, c; cin >> x; p = 100, c = 0; while (p <= x) { p += p / 100; c++; } cout << c << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long int x, p, c; cin >> x; p = 100, c = 0; while (p < x) { p += p / 100; c++; } cout << c << 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
#include <bits/stdc++.h> using namespace std; int main() { int money = 100; int X; cin >> X; int year = 0; while (money < X) { money = money + money / 100; year++; } cout << year << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int64_t money = 100; int64_t X; cin >> X; int year = 0; while (money < X) { money = money + money / 100; year++; } cout << year << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
1
54
X = int(input()) m = 100 for n in range(5000): m = int(m*1.01) if m >= X: print(n) break
X = int(input()) m = 100 for n in range(5000): m = int(m*1.01) if m >= X: print(n+1) break
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]]
5
37
#include <bits/stdc++.h> using namespace std; #define int long long int32_t main() { ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; int p = 100, step = 0; while (p <= n) { p += p / 100; step++; } cout << step; return 0; }
#include <bits/stdc++.h> using namespace std; #define int long long int32_t main() { ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; int p = 100, step = 0; while (p < n) { p += p / 100; step++; } cout << step; return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
69
#include <iostream> using namespace std; int main() { long long int n; cin >> n; long long int p = 100, year = 0; while (p <= n) { p = p + p / 100; year++; } cout << year << endl; return 0; }
#include <iostream> using namespace std; int main() { long long int n; cin >> n; long long int p = 100, year = 0; while (p < n) { p = p + p / 100; year++; } cout << year << 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
/* * main.c * * Created on: 2020/03/28 * Author: family */ #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX(a, b) (a > b ? a : b) #define MIN(a, b) (a > b ? b : a) typedef long long int ll; typedef unsigned long long int ull; int sort_inc(const void *a, const void *b...
/* * main.c * * Created on: 2020/03/28 * Author: family */ #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX(a, b) (a > b ? a : b) #define MIN(a, b) (a > b ? b : a) typedef long long int ll; typedef unsigned long long int ull; int sort_inc(const void *a, const void *b...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
461
#include <iostream> using namespace std; int main() { int money = 100, X, year = 0; cin >> X; if (X == 100) { cout << 0 << endl; } else { while (money < X) { int kinri = money / 100; money += kinri; year++; } cout << year << endl; } return 0; }
#include <iostream> using namespace std; int main() { long long money = 100, X, year = 0; cin >> X; if (X == 100) { cout << 0 << endl; } else { while (money < X) { long long kinri = money / 100; money += kinri; year++; } cout << year << endl; } return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 9, 0, 52, 8, 9, 0, 43, 39, 40], ["+", 0, 52, 8, 9, 0, 43, 39, 86, 0, 96]]
1
75
x = int(input()) count = 0 a = 100 while True: a *= 1.01 a = int(a) if int(a) >= x: break else: count += 1 print(count)
x = int(input()) count = 1 a = 100 while True: a *= 1.01 a = int(a) if int(a) >= x: break else: count += 1 print(count)
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]]
5
44
#include <bits/stdc++.h> using namespace std; int main() { long double X, s; cin >> X; s = 100; for (int i = 0; i < 100000000; i++) { s *= 1.01; if (s >= X) { cout << i + 1 << endl; break; } } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long int X, s; cin >> X; s = 100; for (int i = 0; i < 100000000; i++) { s *= 1.01; if (s >= X) { cout << i + 1 << endl; break; } } return 0; }
[["-", 0, 14, 8, 9, 0, 43, 39, 86, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 39, 40]]
1
67
#include <bits/stdc++.h> using namespace std; int main() { int i; int X; int Y = 100; cin >> X; for (i = 0; Y < X; i++) { Y += Y / 100; } cout << i << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long i, X; long long Y = 100; cin >> X; for (i = 0; Y < X; i++) { Y += Y / 100; } cout << i << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21]]
1
54
x = int(input()) sm = 100 count = 0 while sm >= x: count += 1 sm += int(0.01*sm) print(count)
x = int(input()) sm = 100 count = 0 while sm < x: count += 1 sm += int(0.01*sm) print(count)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 20], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18]]
5
34
package main import ( "fmt" "math" ) func main() { var x float64 fmt.Scan(&x) cur := float64(100) var i int for { i++ cur = math.Trunc(cur*1.01) if x < cur{ fmt.Println(i) return } } }
package main import ( "fmt" "math" ) func main() { var x float64 fmt.Scan(&x) cur := float64(100) var i int for { i++ cur = math.Trunc(cur*1.01) if x <= cur{ fmt.Println(i) return } } }
[["-", 0, 7, 8, 196, 0, 57, 15, 16, 17, 18], ["+", 0, 7, 8, 196, 0, 57, 15, 16, 17, 19]]
7
79
function main(final) { let amount = 100; let year = 0; while (amount <= final) { amount = Math.floor(amount + (amount * 0.01)); year++; } console.log(year); } const input = require('fs').readFileSync('/dev/stdin', 'utf8'); main(parseInt(input));
function main(final) { let amount = 100; let year = 0; while (amount < final) { amount = Math.floor(amount + (amount * 0.01)); year++; } console.log(year); } const input = require('fs').readFileSync('/dev/stdin', 'utf8'); main(parseInt(input));
[["-", 8, 556, 0, 52, 15, 23, 0, 16, 17, 19], ["+", 8, 556, 0, 52, 15, 23, 0, 16, 17, 18]]
2
79
#include <bits/stdc++.h> using namespace std; int main() { long long s = 100; int k = 0; double x; cin >> x; while (s <= x) { s += floor(s * 1.01); k++; } cout << k << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long s = 100; int k = 0; double x; cin >> x; while (s < x) { s += floor(s / 100); k++; } cout << k << endl; return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 17, 48], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 17, 85], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 12, 13]]
1
59
# -*- coding: utf-8 -*- """ Created on Sat May 2 19:45:18 2020 @author: harsh """ #%% import math x=int(input()) rate=100 i=1 while(True): if(rate>=x): print(i) break else: rate=rate*1.01 i+=1 #print((math.log(x/100))/(math.log(1.01)))
# -*- coding: utf-8 -*- """ Created on Sat May 2 19:45:18 2020 @author: harsh """ #%% import math x=int(input()) rate=100 i=1 while(True): if(rate>=x): print(i-1) break else: rate=int(rate*1.01) i+=1 #print((math.log(x/100))/(math.log(1.01)))
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612], ["+", 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
49
import math x = int(input()) y=math.floor(100) d=int(y) print(d) year=0 while y<x: y*=1.01 d=int(y) y=d year+=1 #print(y,year) print(year)
import math x = int(input()) y=math.floor(100) d=int(y) year=0 while y<x: y*=1.01 d=int(y) y=d year+=1 #print(y,year) print(year)
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
56
#include <stdio.h> int main(void) { int i; long int K; long int x, y; double n = 1.01; x = 100; scanf("%ld", &K); for (i = 1; i < 5000; i++) { x = x * n; if (K == x) { printf("%d", i); } } return 0; }
#include <stdio.h> int main(void) { int i; long int K; long int x; double n = 1.01; x = 100; scanf("%ld", &K); for (i = 1; i < 5000; i++) { x = x * n; if (K <= x) { printf("%d", i); break; } } return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 19], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94]]
0
82
X = int(input()) a, b = 100, 1 while 1: a += a * 0.01 if a >= X: print(b) break b += 1
X = int(input()) a, b = 100, 1 while 1: a += int(a * 0.01) if a >= X: print(b) break b += 1
[["+", 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
36
X = int(input()) a, b = 100, 1 while 1: a += a * 0.01 if a >= X: print(b) break b += 1
import math X = int(input()) a, b = 100, 1 while 1: a += int(a * 0.01) if a >= X: print(b) break b += 1
[["+", 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, 652, 63, 22], ["+", 0, 1, 0, 677, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 677, 12, 652, 3, 4, 0, 25]]
5
36
#include <math.h> #include <stdio.h> int main(void) { long int x; long double a = 100.0; long int i = 1; scanf("%ld", &x); while (a < x) { a = floorl(1.01 * a); i++; } printf("%ld", i); return 0; }
#include <math.h> #include <stdio.h> int main(void) { long int x; long double a = 100.0; long int i = 0; scanf("%ld", &x); while (a < x) { a = floorl(1.01 * a); i++; } printf("%ld", i); return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
0
69
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using BigInt = long long; #define ALL(a) (a).begin(), (a).end() const long long INF = 1LL << 60; const int MOD = 1000000007; int main() { long long X; cin >> X; long long money = 100; for (...
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using BigInt = long long; #define ALL(a) (a).begin(), (a).end() const long long INF = 1LL << 60; const int MOD = 1000000007; int main() { long long X; cin >> X; long long money = 100; for (...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
99
# import math x = int(input()) cnt = 0 answer = 100 # こんなのやらなくてよかったク◯アホ # 金額* 0.01 = 利子 # 福利計算式 FV = PV * (1 + R) ** n # fv(futurevalue):将来価値 pv(presentvalue)(元金):現在価値 r:金利(年利)% n:経過年数 # fv = 100 (1 + 1) # k = 100 * (1 + 1) ** n k / 100 # x = x / 100 # print(math.log(2, x)) # for i in range(x): # # ans += ...
# import math x = int(input()) cnt = 0 answer = 100 # こんなのやらなくてよかったク◯アホ # 金額* 0.01 = 利子 # 福利計算式 FV = PV * (1 + R) ** n # fv(futurevalue):将来価値 pv(presentvalue)(元金):現在価値 r:金利(年利)% n:経過年数 # fv = 100 (1 + 1) # k = 100 * (1 + 1) ** n k / 100 # x = x / 100 # print(math.log(2, x)) # for i in range(x): # # ans += ...
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18]]
5
47
X = int(input()) A = 100 c = 0 while(A < X): A = A * 1.01 c = c + 1 print(c)
X = int(input()) A = 100 c = 0 while(A < X): A = int(A * 1.01) c = c + 1 print(c)
[["+", 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
35
X = int(input()) price=100 year=0 while price < X: price += round(price*0.01) year+=1 print(year)
import math X = int(input()) price=100 year=0 while price < X: price += math.floor(price*0.01) year+=1 print(year)
[["+", 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, 652, 63, 22], ["+", 0, 1, 0, 677, 12, 652, 63, 319, 500, 22], ["+", 0, 1, 0, 677, 12, 652, 63, 319, 0, 131], ["+", 0, 1, 0, 677, 12, 652, 63, 319, 319, 22]]
5
34
import math K = input() K = float(K) X = 100.0 i = 0 while K >= X: X = X *1.01 X = math.floor(X) i = i + 1 print(i)
import math K = input() K = float(K) X = 100.0 i = 0 while K > X: X = X *1.01 X = math.floor(X) i = i + 1 print(i)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 20], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 47]]
5
46
#include <iostream> using namespace std; int main() { int X; cin >> X; int yokin = 100; int ans = 0; while (yokin < X) { yokin += yokin / 100; ++ans; } cout << ans << endl; return 0; }
#include <iostream> using namespace std; int main() { long long X; cin >> X; long long yokin = 100; long long ans = 0; while (yokin < X) { yokin += yokin / 100; ++ans; } cout << ans << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
55
# B x = int(input()) deposit = 100 count = 0 while x >= deposit: deposit += deposit*1//100 count += 1 print(count)
# B x = int(input()) deposit = 100 count = 0 while x > deposit: deposit += deposit*1//100 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
34
# -*- coding: utf-8 -*- X = int(input()) n = 1 m = 100 while m < X: n += 1 m += m//100 print(n)
# -*- coding: utf-8 -*- X = int(input()) n = 0 m = 100 while m < X: n += 1 m += m//100 print(n)
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]]
5
32
#include <bits/stdc++.h> using namespace std; template <class T> ostream &operator<<(ostream &os, vector<T> V) { os << "[ "; for (auto v : V) os << v << " "; return os << "]"; } template <class T> ostream &operator<<(ostream &os, set<T> S) { os << "{ "; for (auto s : S) os << s << " "; return os << ...
#include <bits/stdc++.h> using namespace std; template <class T> ostream &operator<<(ostream &os, vector<T> V) { os << "[ "; for (auto v : V) os << v << " "; return os << "]"; } template <class T> ostream &operator<<(ostream &os, set<T> S) { os << "{ "; for (auto s : S) os << s << " "; return os << ...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
515
import math def readInt(): return int(input()) def readInts(): return list(map(int, input().split())) def readChars(): return input().split() x = readInt() m = 100 n = 0 while 1: if m>x: print(n) break n+=1 m=math.floor(m*1.01)
import math def readInt(): return int(input()) def readInts(): return list(map(int, input().split())) def readChars(): return input().split() x = readInt() m = 100 n = 0 while 1: if m>=x: print(n) break n+=1 m=math.floor(m*1.01)
[["-", 0, 52, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 667, 20]]
5
85
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll X; cin >> X; double sum = 100; ll n = 0; while (sum < X) { sum = sum * 101 / 100; n++; } cout << n << endl; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll X; cin >> X; ll sum = 100; ll n = 0; while (sum < X) { sum = sum + sum / 100; n++; } cout << n << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 17, 48], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 1, 0, 11, 12, 16, 12, 16, 31, 22]]
1
59
#include <bits/stdc++.h> using namespace std; int main() { int x; cin >> x; unsigned long long int money = 100, cnt = 0; while (money >= x) { money *= 1.01; cnt++; } cout << cnt << endl; }
#include <bits/stdc++.h> using namespace std; int main() { unsigned long long int x; cin >> x; unsigned long long int money = 100, cnt = 0; while (money < x) { money *= 1.01; cnt++; } cout << cnt << endl; }
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 87], ["+", 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, 18]]
1
52
#include <bits/stdc++.h> using namespace std; int main() { unsigned long long int a, b; int i = 0; cin >> a; b = a; while (b < a) { b = b + 0.01 * b; i++; } cout << i << '\n'; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { unsigned long long int a, b; int i = 0; cin >> a; b = 100; while (b < a) { b = b + 0.01 * b; i++; } cout << i << '\n'; return 0; }
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13]]
1
63
#include <math.h> #include <stdio.h> int main(void) { long int i; float j, N, X; j = 100.0; scanf("%f", &X); for (i = 0; i < 4000; i++) { j = j + j / 100; if (X <= j) { // printf("%f\n" ,100.0*pow(1.01,i+1)); printf("%d", i + 1); break; }; }; return 0; }
#include <math.h> #include <stdio.h> int main(void) { long int i; long long int j, N, X; j = 100.0; scanf("%lld", &X); for (i = 0; i < 4000; i++) { j = j + j / 100; if (X <= j) { // printf("%f\n" ,100.0*pow(1.01,i+1)); printf("%ld", i + 1); break; }; }; 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, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
86
#include <cmath> #include <iostream> using namespace std; int main() { int X; cin >> X; int okane = 100; int count = 0; while (okane < X) { okane += okane / 100; count++; } cout << count << endl; }
#include <cmath> #include <iostream> using namespace std; int main() { long long X; cin >> X; long long okane = 100; long long count = 0; while (okane < X) { okane += okane / 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
54
#include <bits/stdc++.h> using namespace std; int main() { int x; int a = 100; cin >> x; int i; for (i = 0; a < x; i++) { a += (a / 100); } cout << i << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long x; long long a = 100; cin >> x; long long i; for (i = 0; a < x; i++) { a += (a / 100); } cout << i << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
56
#include <bits/stdc++.h> using namespace std; int main() { int x, s = 100; cin >> x; int y = 0; while (s > 0) { if (s >= x) { break; } s += s / 100; y++; } cout << y << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long x, s = 100; cin >> x; long long y = 0; while (s > 0) { if (s >= x) { break; } s += s / 100; y++; } cout << y << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
61
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> Pll; #define F first #define S second #define MP make_pair #define PB push_back #define rad(X) cout << (X) << endl #define ASH(X) cout << (X) << " " #define debug(x) cout << #x << " " << x << endl; #define debug2(x, y) cout << #x ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> Pll; #define F first #define S second #define MP make_pair #define PB push_back #define rad(X) cout << (X) << endl #define ASH(X) cout << (X) << " " #define debug(x) cout << #x << " " << x << endl; #define debug2(x, y) cout << #x ...
[["-", 0, 52, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]]
1
262
#include <bits/stdc++.h> using namespace std; int main() { // ここにプログラムを追記 int X; cin >> X; int x = 100; for (int i = 1;; i++) { x += x / 100; if (x >= X) { cout << i << endl; break; } } }
#include <bits/stdc++.h> using namespace std; int main() { // ここにプログラムを追記 long X; cin >> X; long x = 100; for (int i = 1;; i++) { x += x / 100; if (x >= X) { cout << i << endl; break; } } }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
60
/*input */ /* ************************** * * * AUTHOR :: knight_coder * * * ************************** */ #include <bits/stdc++.h> #define lld long long int #define pb push_back #define ppb pop_back #define endl '\n' #define mii map<lld, lld> #define msi map<string, lld> #define mis map<lld, string> #def...
/*input 1000000000000000000 */ /* ************************** * * * AUTHOR :: knight_coder * * * ************************** */ #include <bits/stdc++.h> #define lld long long int #define pb push_back #define ppb pop_back #define endl '\n' #define mii map<lld, lld> #define msi map<string, lld> #define mis ma...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["-", 8, 9, 0, 9, 0, 1, 0, 11, 31, 22], ["-", 8, 9, 0, 9, 0, 1, 0, 11, 17, 32], ["-", 0, 9, 0, 1, 0, 11, 12, 23, 0, 24], ["-", 0, 1, 0, 11, 12, 23, 0, 16, 17, 72], ["+", 8, 9, 0, 9, 0, 1, 0, 11, 17, 107], ["-", 0, 9, 0, 1, 0, 11, 12, 23, 0, 25...
1
283
#include <bits/stdc++.h> using namespace std; int main() { long long int X; int N, temp = 100; cin >> X; for (N = 0; temp >= X; N++) { temp += temp * 0.01; } cout << N << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long int X, N, temp = 100; cin >> X; for (N = 0; temp < X; N++) { temp += temp * 0.01; } cout << N << endl; }
[["-", 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, 0, 21], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 20], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]]
1
55
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll X; cin >> X; ll ans = 0; ll s = 100; for (int i = 0; i < 4000; i++) { s = (s * 101 / 100); ans++; if (s >= X) { break; } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll X; cin >> X; int ans = 0; ll s = 100; for (int i = 0; i < 4000; i++) { s = s + s / 100; ans++; if (s >= X) { break; } } cout << ans << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 8, 9, 0, 1, 0, 11, 12, 23, 0, 24], ["-", 0, 11, 12, 23, 0, 16, 31, 16, 17, 48], ["-", 0, 11, 12, 23, 0, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 1, 0, 11, 12, 16, 12, 16, 31, 22], ["-", 8, 9, 0, 1, ...
1
77
#include <bits/stdc++.h> using namespace std; long interest(long g) { return g = g * 1.01; } int main(void) { int x; long tmp = 100; int ans = 0; cin >> x; while (tmp < x) { tmp = interest(tmp); ans += 1; } // cout << "tmp = " << tmp << endl; cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; long interest(long g) { return g = g * 1.01; } int main(void) { long x; long tmp = 100; int ans = 0; cin >> x; while (tmp < x) { tmp = interest(tmp); ans += 1; } // cout << "tmp = " << tmp << endl; cout << ans << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
74
from math import floor,ceil X = int(input()) p = 100 c = 0 while cash < X: p=floor(p*1.01) c += 1 print(c)
from math import floor,ceil X = int(input()) p = 100 c = 0 while p < X: p=floor(p*1.01) c += 1 print(c)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 0, 22], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 0, 22]]
5
40
n=int(input()) c=1 x=100 while x<n: x=x*(1.01) x=int(x) c+=1 print(c)
n=int(input()) c=1 x=100 while x<n: x=x*(1.01) x=int(x) c+=1 print(c-1)
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]]
5
39
#include <bits/stdc++.h> using namespace std; #define int long long typedef long long ll; typedef long double ld; int mod = 1e9 + 7; int solve(int x) { int ans = 100; while (x--) { ans += ans / 100; } // cout<<ans<<endl; return ans; } signed main() { ios::sync_with_stdio(0); cin.tie(0); cout.ti...
#include <bits/stdc++.h> using namespace std; #define int long long typedef long long ll; typedef long double ld; int mod = 1e9 + 7; int solve(int x) { int ans = 100; while (x--) { ans += ans / 100; } // cout<<ans<<endl; return ans; } signed main() { ios::sync_with_stdio(0); cin.tie(0); cout.ti...
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
147
#include <bits/stdc++.h> using namespace std; int main() { int x, i = 1, m = 100; cin >> x; while (true) { m += (m / 100); if (m >= x) { cout << i << endl; break; } i++; } }
#include <bits/stdc++.h> using namespace std; int main() { long long x, i = 1, m = 100; cin >> x; while (true) { m += (m / 100); if (m >= x) { cout << i << endl; break; } i++; } }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
60
#include <bits/stdc++.h> using namespace std; int main() { long long X; cin >> X; long long a = 100; for (int i = 0; i < 10000; i++) { a = a * 101 / 100; if (a >= X) { cout << i + 1 << endl; return 0; } } }
#include <bits/stdc++.h> using namespace std; int main() { long long X; cin >> X; long long a = 100; for (int i = 0; i < 100000; i++) { a = a + a / 100; if (a >= X) { cout << i + 1 << endl; return 0; } } }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 17, 48], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 1, 0, 11, 12, 16, 12, 16, 31, 22]]
1
69
#include "bits/stdc++.h" #include <math.h> #include <time.h> using namespace std; const long long mod = 1000000007; #define ll long long #define P pair<int, int> #define dump(x) \ if (dbg) { ...
#include "bits/stdc++.h" #include <math.h> #include <time.h> using namespace std; const long long mod = 1000000007; #define ll long long #define P pair<int, int> #define dump(x) \ if (dbg) { ...
[["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
172
function main(input) { const lines = input.trim().split("\n"); const X = +lines[0]; let d = 100; let res = 0; while (d <= X) { d += Math.floor(d / 100); res++; } console.log(res); } main(require("fs").readFileSync("/dev/stdin", "utf8"));
function main(input) { const lines = input.trim().split("\n"); const X = lines[0]; let d = 100; let res = 0; while (d < X) { d += Math.floor(d / 100); res++; } console.log(res); } main(require("fs").readFileSync("/dev/stdin", "utf8"));
[["-", 8, 556, 0, 570, 0, 200, 51, 91, 17, 72], ["-", 8, 556, 0, 52, 15, 23, 0, 16, 17, 19], ["+", 8, 556, 0, 52, 15, 23, 0, 16, 17, 18]]
2
92
result = int(input()) count = 0 kinngaku = 100 while kinngaku <= result: count += 1 kinngaku += int(kinngaku * 0.01) print(count)
result = int(input()) count = 0 kinngaku = 100 while kinngaku < result: count += 1 kinngaku += int(kinngaku * 0.01) print(count)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18]]
5
34
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x, to) for (x = 0; x < (to); x++) #define FORR(x, arr) for (auto &x : arr) #define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++) #define ALL(a) (a.begin()), ...
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x, to) for (x = 0; x < (to); x++) #define FORR(x, arr) for (auto &x : arr) #define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++) #define ALL(a) (a.begin()), ...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
234
#include <stdio.h> int main() { long X, i, A; scanf("%ld", &X); A = 100; for (i = 1; A < X; i++) { A = A + A / 100; } printf("%ld\n", i); return 0; }
#include <stdio.h> int main() { long X, i, A; scanf("%ld", &X); A = 100; for (i = 0; A < X; i++) { A = A + A / 100; } printf("%ld\n", i); return 0; }
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]]
0
65
a=int(input()) t=100 sum=0 while(t<a): t=floor(t*101/100) sum=sum+1 print(sum)
import math a=int(input()) t=100 sum=0 while(t<a): t=math.floor(t*101/100) sum=sum+1 print(sum)
[["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 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]]
5
40
k = int(input()) now = 100 count = 0 while now <= k: now = now + int(now*0.01) count += 1 print(count)
k = int(input()) now = 100 count = 0 while now < k: now = now + int(now*0.01) count += 1 print(count)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18]]
5
36
#include <iostream> using namespace std; typedef long long ll; int main() { ll X; cin >> X; ll i = 0; ll sum = 100; while (sum <= X) { ll a = sum * 0.01; sum += a; i++; } cout << i << endl; return 0; }
#include <iostream> using namespace std; typedef long long ll; int main() { ll X; cin >> X; ll i = 0; ll sum = 100; while (sum < X) { ll a = sum * 0.01; sum += a; i++; } cout << i << endl; return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18]]
1
65