Search is not available for this dataset
name
stringlengths
2
88
description
stringlengths
31
8.62k
public_tests
dict
private_tests
dict
solution_type
stringclasses
2 values
programming_language
stringclasses
5 values
solution
stringlengths
1
983k
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int n, i, kurai; double price = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { price = price * 1.05; } price = price / 1000; kurai = (int)price % 10; price = price / 10; if (kurai >= 5) { price = (int)price + 1; } price = price * 10000; printf("%.0f", price); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
def calcDebt(n) m = 100000.to_f return ((m * (1.05.to_f ** n.to_f)) / 10000.to_f).ceil.to_i * 10000 end n = gets.to_i puts calcDebt(n)
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> int main() { int money = 100000; int n; scanf("%d", &n); for (int i = 0; i < n; i++) { money *= 1.05; if (money % 1000 != 0) { money += 1000 - (money % 1000); } } printf("%d", money); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
a=100000;gets.to_i.times{a=((a*1.05/1000).ceil)*1000;};puts a;
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int r = 100000, n, a; scanf("%d", &n); for (int i = 1; i < n; i++) { r = r * 1.05; } if (r % 10000 > 0) { a = r % 10000; r = r + (10000 - a); } printf("%d\n", r); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; double money = 100; cin >> n; for (size_t i = 0; i < n; i++) { money = money * 1.05; money = ceil(money); } cout << money * 1000 << endl; return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int a, i, j, k; a = 100000; scanf("%d", &i); for (j = 1; j <= i; j++) { a = a * 1.05; k = a % 1000; if (k < 1000 && k > 0) { a = a - k + 1000; } } printf("%d", a); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int debt(int n); int main(void) { int n; scanf("%d", &n); printf("%d\n", debt(n)); return (0); } int debt(int n) { int last; int a; last = 100000; for (a = 0; a < n; a++) { last += 5000; } if (last % 10000 != 0) { last /= 10000; last++; last *= 10000; } return (last); }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n; int i; long x = 100000; long y; scanf("%d", &n); for (i = 0; i < n; i++) x = x * 1.05; y = x; y = y / 1000; y = y % 10; if (y > 0) x = (x / 10000) * 10000 + 10000; else x = (x / 10000) * 10000; printf("%d\n", x); return (0); }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
python3
n = int(input()) d = 100000 c = 1000 for i in range(n): d *= 1.05 d =int(d/c+0.9)*c print(d)
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int a = 100000, b = 0, t; cin >> t; if (t == 0) cout << a << endl; else if (t <= 100) { for (int k = 1; k <= t; k++) { b = a * 1.05; b = (b + 900) / 1000 * 1000; a = b; } cout << b << endl; } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; while (cin >> n) { int sum = 100000; for (int i = 0; i < n; i++) { sum *= 105 / 100.0; if ((int)sum % 1000 >= 100) { sum /= 1000; sum *= 1000; sum += 1000; } } printf("%d\n", (int)sum); } return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { char str[20] = {0}, str_copy[21] = {0}; int i, j, money = 100000, debt, week, surplus; scanf("%d", week); for (i = 0; i < week; i++) { debt = money * 1.05; surplus = debt % 1000; if (surplus) { debt = debt + 1000 - surplus; } } printf("%d\r\n", debt); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
python2
import math base = 100000 r = base * 0.05 n = int(raw_input()) if n <= 100: q = int(math.ceil((r * n) / 10000)) print "{}".format(base + (q * 10000))
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { static float debt = 100000; public static void main(String[] args) throws IOException { int n; float hell = debt; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); n = Integer.parseInt(br.readLine()); for (int i = 0; i < n; i++) { hell += hell * 0.05; } System.out.println((int) hell + (hell % 100 > 0 ? 1000 : 0)); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int money = 100000; int n; int i; scanf("%d", &n); for (i = 0; i < n; i++) { money += money * 0.05; } if (money % 10000 >= 5) { money /= 10000; money += 1; money *= 10000; } else { money /= 10000; money *= 10000; } printf("%d\n", money); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.io.IOException; import java.math.BigDecimal; public class Main { private static final double TAX = 1.05; /** * <p> [??????] n ?????\???????????¨??????n ??±????????????????????????????????????????????????????????°?????????n ??? 100 ??\??????</p> * <p> [??¬???] ???????????????</p> * <p> [??????] ???????????????</p> * @param args * @throws IOException */ public static void main(String[] args) throws IOException { double totalAmount = 100000; BigDecimal returnAmount=new BigDecimal(0); int i = Integer.parseInt(args[0]); //??\??????????????°???????????????????¢????????????? for (int count = 0; count < i; count++) { totalAmount = totalAmount * TAX; returnAmount = new BigDecimal(totalAmount).setScale(-3, BigDecimal.ROUND_UP); } //??????????????????????????? System.out.println(returnAmount.intValue()); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { double debt = 100000.0; int n, r; cin >> n; while (n-- > 0) { debt *= 1.05; r = (int)debt % 1000; if (r != 0) { debt = debt - r + 1000; } } cout << debt << endl; return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; int roan = 100000; cin >> n; for (int i = 0; i < n; ++i) { roan = (int)(roan * 1.05); } roan += 5000; roan = (roan / 10000) * 10000; cout << roan << endl; return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int n, i, mny = 100000, intrst = 100000 * 0.05; scanf("%d", &n); for (i = 0; i < n; i++) { mny += intrst; } if (mny % 10000 > 0) { mny = mny - (mny % 10000) + 10000; } printf("%d\n", mny); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; int i, n; cin >> n; a = 100000; for (i = 0; i < n; i++) { b = a / 20 + a; if (b % 1000 != 0) b += 1000; b /= 1000; b *= 1000; a = b; } cout << a; return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int n, i; double Kdebt = 100; scanf("%d", &n); for (i = 1; i <= n; i++) { Kdebt = ceil(Kdebt * 1.05); } printf("%d\n", (int)Kdebt * 1000); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main(void) { int n; int debt = 100; cin >> n; for (int i = 0; i < n; i++) { debt = ((debt * 1.05) + 0.9); } cout << debt * 1000 << endl; return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
python3
ef Round(ip, dg): # ip???dg?????§?????¨?????\????????¢??° ip = ip / 10**dg if(ip-int(ip) != 0): return (int(ip) + 1)*10**dg else: return int(ip)*10**dg n=int(input()) sum=100000 for i in range(0, n): sum=Round(sum*1.05) print(sum)
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
/* AOJ 7 Debt Hell(PCK2003) AC */ import std.stdio, std.math, std.string, std.conv; void main() { double m = 100000; int n = readln.chomp.to!int; foreach (int i; 0..n) { m *= 1.05; if (m % 1000 != 0) m = m + (1000 - m%1000); } writeln(m); }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
python3
import math v = int(input()) cal = 100000 for w in range(5): cal = math.ceil(cal * 1.05 * 0.001) * 1000 print("%d" % cal)
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; template <class T> inline void chmax(T& a, T b) { if (b > a) a = b; } template <class T> inline void chmin(T& a, T b) { if (b < a) a = b; } int main() { int N; double money = 100000; cin >> N; for (int i = 0; i < (int)(N); i++) { money = money * 1.05; money = (int)ceil(money / 1000) * 1000; } cout << money << endl; return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> float i, t = 10; int main(void) { scanf("%f", &i); for (; i--; t *= 1.05) ; printf("%.f0000\n", t + 0.9); }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { double n, add, money = 100000; while (cin >> n) { add = 0; money = 100000; for (int i = 0; i < n; i++) { add = money * 0.05; money += add; } int ans = money; cout << ans << endl; if (ans % 1000 < 1000) { ans /= 10000; ans *= 10000; ans += 10000; } cout << ans << endl; } return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n; int i; int b = 100000; int a; scanf("%d ", &n); for (i = 0; i < n; i++) { b += (b * 0.05); a = (b / 1000) * 1000; if (a != b) a += 1000; b = a; } printf("%d\n", b); }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main(void) { int loan = 100000; int week; cin >> week; for (int i = 0; i < week; i++) { loan *= 1.05; } double tmp = (double)loan / 10000; tmp += 0.5; loan = (int)tmp; loan *= 10000; cout << loan; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int r = 100000, n, a; scanf("%d", &n); if (n == 0) { printf("100000\n"); } else { for (int i = 1; i <= n; i++) { r = r * 1.05; } a = r % 10000; r = r + (10000 - a); printf("%d\n", r); } return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> int age(int t) { return ceil((double)t / 10000) * 10000; } int main() { int n; std::cin >> n; int loan = 100000; int aaa; for (int i = 0; i < n; i++) aaa = age(loan + loan * 0.05 * n); std::cout << aaa << std::endl; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
using System; public class DebtHell { public static void Main(string[] args) { int week = int.Parse(Console.ReadLine()); double cache = 100000; for (int i = 0; i < week; i++) { cache *= 1.05; uint tempCache = (uint)cache; cache = tempCache; } cache += 9000; string temp = cache.ToString(); Console.WriteLine(uint.Parse((temp.Substring(0, temp.Length - 4) + "0000"))); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
include <iostream> # include <stdio.h> # include <math.h> using namespace std; int main() { int n; cin>>n; float newamount=100000; for(int i=0;i<n;i++){ float copy=newamount*21/20; copy=ceil(copy/1000); copy=copy*1000; newamount=copy; } cout<<ceil(newamount); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n, debt, i, amari, real; scanf("%d", &n); debt = 100000; for (i = 0; i < n; i++) { debt = debt * 1.05; } amari = debt % 1000; if (amari != 0) { real = debt - amari + 1000; printf("%d\n", real); } else { printf("%d\n", debt); } return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> int main() { int n; double ans; double check; scanf("%d", &n); ans = 100000; for (int i = 0; i < n; i++) { ans = ans * 1.05; } check = ceil(ans / 10000); ans = check * 10000; printf("%d\n", int(ans)); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n; long int total = 100000; scanf("%d", &n); for (; n > 0; n--) { total *= 1.05; if ((total % 1000) > 0) total = (total / 1000 + 1) * 1000; } printf("%d", total); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int a = 100000; int b = 0; float c = 0.05; int n = 0; scanf("%d", &n); if (n > 100) {     n = 100; } b = a * c; for (int i = 0; i < n; i++) { a += b; } a = int(a / 100) * 100; printf("%d\n", a); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n = 0; int debt = 100000; cin >> n; for (int i = 0; i < n; i++) { debt = debt * 1.05; if (debt % 1000 != 0) debt = (debt / 1000 + 1) * 1000; } cout << debt; return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
main(i){i&=!puts("13530000");}
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int week; int money = 100000; int i; scanf("%d", &week); for (i = 0; i < week; i++) { money += money * 0.05; if (money % 1000 > 0) { money += 1000; money -= money % 1000; } } printf("%d", money); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int advance_n(int ans, int n) { cout << "ans % int(pow(10,n+2)))10=" << ans % int(pow(10, n)) << endl; cout << "pow(10,n+2)=" << pow(10, n + 2) << endl; cout << "(ans - ans % int(pow(10,n+2)))=" << (ans - ans % int(pow(10, n + 2))) << endl; return (ans - ans % int(pow(10, n)) + (ans % int(pow(10, n + 2)) != 0) * int(pow(10, n))); } int how_much_debt(int n) { if (n == 0) return 100000; else return 1.05 * how_much_debt(n - 1); } int main() { int a; cin >> a; cout << advance_n(how_much_debt(a), 4) << endl; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
python2
n=input() m = 100000 for _ in xrange(5): m = m + m*0.05 if m % 1000: m = m + 1000 - m % 1000 print int(m)
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int week; cin >> week; double pay = 100.0; for (int i = 0; i < week; i++) { pay = ceil(pay * 1.05); cout << "pay = " << pay << endl; } cout << pay * 1000 << endl; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int ceiler(double start) { start /= 1000; start = ceil(start); start *= 1000; return (start); } void check(int num) { cout << ceiler(num) << endl; } int main(void) { double tax = 0.05 * 100000; double start = 100000; int num; cin >> num; for (int r = 0; r <= num; r++) { start += tax; } start = ceiler(start); cout << (int)start << endl; return (0); }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, money = 100000; cin >> n; for (int i = 0; i < n; i++) { money *= 1.05; if (money % 1000 == 0 && i > 0) continue; money = money - (money % 1000) + 1000; } cout << money - 1000 << endl; return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int week; float debt; scanf("%d", &week); printf("rishi:%f\n", pow(1.05, week)); debt = 100000 * pow(1.05, week); printf("moto:%.0f\n", debt); debt = ceil(debt / 10000) * 10000; printf("%.0f\n", debt); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.io.PrintStream; import java.util.Scanner; class Main { public static void main(String[] args) { doit(args, new Scanner(System.in), System.out); } static void doit(String[] args, Scanner scanner, PrintStream out) { int n = scanner.nextInt(); double debt = 100000.0; for (int i = 0; i < n; i++) { debt = Math.ceil(debt * 1.05 / 1000.0) * 1000.0; } out.println(String.format("%d\n", (long) debt)); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> int main() { int money = 100000; int n; scanf("%d", &n); for (int i = 0; i < n; i++) { money *= 1.05; if (money % 1000 != 0) money += 1000 - (money % 1000); } printf("%d", money); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; int sum = 100000; cin >> n; for (int i = 0; i < n; i++) { sum *= 105 / 100.0; if (sum % 1000 > 100) { sum /= 1000; sum *= 1000; sum += 1000; } } cout << sum << endl; return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> int main() { int n; scanf("%d", &n); double a = 100; for (int i = 0; i < n; i++) { a *= 1.05; a = ceil(a); } printf("%d\n", (int)a * 1000); }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { static double debt = 100; public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String s = ""; int n, hell; try { s = br.readLine(); } catch (IOException e) { e.printStackTrace(); } if (isNumber(s)) { n = Integer.parseInt(s); if (n >= 0 && n <= 100) { hell = (int) Math.ceil(debt * Math.pow(1.05, n)); System.out.println(hell * 1000); } } } private static boolean isNumber(String s) { try { int n = Integer.parseInt(s); return true; } catch (NumberFormatException e) { return false; } } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
package hoge.hoge.com; import java.io.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader buf = new BufferedReader(new InputStreamReader(System.in)); int week = Integer.parseInt(buf.readLine()); System.out.println(risi(week)); } public static int risi(int num){ double syakkin = 10; for(int i=0; i<num; i++){ syakkin += syakkin*0.05; } return (int)Math.ceil(syakkin)*10000; } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.math.BigDecimal; /** * 借金を計算する機能 * * @author kohei.nitta * */ class Debt_hell { /** * 標準入力から値を受け取り、n週間後の借金の残高を出力する。 * * @param args * @return * @throws IOException */ public static void main(String[] args){ BigDecimal debt = new BigDecimal("100000"); BigDecimal interest = new BigDecimal("1.05"); BigDecimal roundUp = new BigDecimal("1000"); BufferedReader input = new BufferedReader(new InputStreamReader( System.in)); int inputNo = Integer.parseInt(input.readLine()); for (int i = 1; i <= inputNo; i++) { debt = debt.multiply(interest) .divide(roundUp, 0, BigDecimal.ROUND_UP).multiply(roundUp); } System.out.println(debt); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
<?php fscanf(STDIN, "%d", $n); $debt = 100000; for($i = 1; $i < $n; $i++){ $debt = floor(($debt * 1.05)/1000) * 1000; } echo $debt."\n"; ?>
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.Scanner; public class DeptHell { // ????????????10?????? public static int LOAN = 100000; public static void main(String[] args) { // ??????????????? @SuppressWarnings("resource") Scanner input = new Scanner(System.in); // ?????????????????? double result = calc(input.nextInt()); // ????????\????????????????????? result = roundUp(result); System.out.println((int) result); } /** * ????????????????????????????¨?????????? * * @param week * ??????????????± * @return ???????????????????????? */ public static double calc(int week) { return LOAN + (LOAN * 0.05) * week; } /** * ??\?????????????????????????????\????????????????????? * * @param amount * ?????? * @return ????????\??????????????????????????? */ private static double roundUp(double amount) { // ????????\???????°???°????????? double result = amount / 10000; // ?°???°??????????????? result = Math.ceil(result); // ?????????????????????????????´ return result * 10000; } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <iostream> #include <algorithm> int main() { const int BASE = 100000; int n, debt = BASE; std::cin >> n; while (n--) { debt = (loan * 1.05 + 999) / 1000; debt *= 1000; } std::cout << debt << std::endl; return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.Scanner; class Main{ public static void main(String[] args){ final Scanner sc=new Scanner(System.in); int syakkin=100000; int n=sc.nextInt(); for(int i=0;i<=n;i++){ syakkin*=1.05; syakkin/=1000; syakkin*=1000; } System.out.println(syakkin); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
week = gets bet = 100000 for i in 1..week.to_i bet *= 1.05 bet = ((bet*(0.001)).ceil)*1000 puts bet end
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, res; double m = 100000; cin >> n; if (!n) { cout << m << endl; return 0; } for (; n; n--) m *= 1.05; cout << m << endl; m /= 10000; m += 1; res = (int)m * 10000; cout << res << endl; return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ int n = scan.nextInt(); long mon = 100_000; for(int i = 0; i < n; i++){ mon = (long) Math.ceil(mon * 1.05 / 1000.0); } System.out.printf("%d\n", mon); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int x = 100000; int i, n; scanf("%d", &n); for (i = 0; i < n; i++) { x = x * 1.05; } if (x % 1000 != 0) { x = x + 10000; } x = x / 10000; x = x * 10000; printf("%d\n", x); return (0); }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int n, i, mny = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { mny *= 1.05; } if (mny % 10000 > 0) { mny = mny - (mny % 10000) + 10000; } printf("%d\n", mny); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
using System; public class DebtHell { public static void Main(string[] args) { int week = int.Parse(Console.ReadLine()); double cache = 100000; for (int i = 0; i < week; i++) { cache *= 1.05; uint tempCache = (uint)cache; cache = tempCache; } cache += 9000; string temp = cache.ToString(); Console.WriteLine(temp.Substring(0, temp.Length - 4) + "0000"); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
var weeks = require("fs").readFileSync("/dev/stdin","utf8").trim().split('') var debt = 100000; var interest = 5; var roundedDebt = calculateDebt(debt, weeks, interest); console.log(roundedDebt); function calculateDebt(debt, interest, weeks){ for (i = 0; i < 5; i++) { debt = debt * 1.05; debt = Math.ceil(debt/1000)*1000; } return debt; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.Scanner; 2 3 public class Main { 4 public static void main(String[] args) { 5 Scanner scn = new Scanner(System.in); 6 int n = scn.nextInt(); 7 int debt = 100; 8 for (int i = 0; i < n; i++) { 9 debt = (int)Math.ceil(debt * 1.05); 10 } 11 System.out.println(debt * 1000); 12 } 13 }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <stdio.h> int main(void){ int loan=100000; double temp=0.0; int week; int check=0; scanf("%d", &week); while(week > 0){ temp=loan*1.05; loan=(int)temp; check = temp % 1000; if(check!=0){ temp/=1000; temp*=1000; temp+=1000; loan=temp; week--; continue; } check = temp % 100; if(check!=0){ temp/=100; temp*=100; temp+=100; loan=temp; week--; continue; } check = temp % 10; if(check!=0){ temp/=10; temp*=10; temp+=10; loan=temp; week--; continue; } if( (temp-loan) != 0){ loan+=1; } week--; } printf("%d\n",loan); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main(void) { int money = 100000; int n; cin >> n; for (int i = 0; i <= n; i++) { money *= 1.05; if (money % 1000 != 0) { money += 1000; } money -= money % 1000; } cout << money << endl; return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
python3
week = int(input()) debt = 100000 for i in range(week): debt *= 1.05 ans = int(debt // 1000 *1000) print(ans)
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
python3
inp = int(input()) debt = 100000 num = 0 lisdeb = [] stdeb = "" for i in range(inp): debt +=6000 debt = int(debt) for i2 in range(len(str(debt))-1): lisdeb.append(str(debt)[i2]) lisdeb.append(str(debt)[-1]) for i2 in range(len(lisdeb)): if i2 == len(lisdeb)-3: stdeb += "0" elif i2 == len(lisdeb)-2: stdeb += "0" elif i2 == len(lisdeb)-1: stdeb += "0" else: stdeb += lisdeb[i2] debt = int(stdeb) lisdeb = [] stdeb = "" print(debt)
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n, i, a, temp; a = 100000; scanf("%d", &n); for (i = 0; i < n; ++i) { a = a * 1.05; temp = a % 1000; a = a - temp + 1000; } printf("%d\n", a); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int money = 100000; int week, i; char input[100]; fgets(input, 100, stdin); sscanf(input, "%d", &week); for (i = 1; i <= week; i++) { money = money / 20 * 21; if (money % 1000 != 0) { money = money - (money % 1000) + 1000; } } printf("%d", money); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> int main() { int n, i, kin2; double kin = 100000, risoku = 0.05; scanf("%d", &n); for (i = 0; i < n; i++) { kin = kin + (kin * risoku); kin2 = (int)(kin / 1000 + 0.9); kin = kin2 * 1000; } kin2 = (int)kin; printf("%d\n", kin2); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.Scanner; public class Main { // ????????????10?????? public static int LOAN = 100000; public static void main(String[] args) { // ??????????????? @SuppressWarnings("resource") Scanner sc = new Scanner(System.in); int input = sc.nextInt(); double result = LOAN; // ?????±??????????¨???? for (int i = 0; input > i; i++) { // ?????????????????? result = result * 1.05; // ????????\????????????????????? // ????????\???????°???°????????? result = result / 1000; // ?°???°??????????????? result = Math.ceil(result); // ????????????????????? result = result * 1000; } System.out.print((int) result); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; double m = 100000; for (int i = 0; i < n; i++) { m *= 1.05; m /= 1000; m = ceil(m); m *= 1000; } cout << m << endl; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n, i; double x = 100; scanf("%d", &n); for (i = 0; i < n; i++) { x = (int)ceil(x * 1.05); } printf("%f", x * 1000); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); double debt = 100000; for(int i=1;i<n+1;i++){ debt *= 1.05; } debt/=10000; System.out.println((int)(Math.ceil(debt)*10000)); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int n, k, i; int j; i = 100; scanf("%d", &n); for (k = 1; k <= n; k++) { j = i * 1.05; if (i * 105 == j * 100) { i = i * 1.05; } else { i = i * 1.05 + 1; } printf("%d\n", i); } printf("%d\n", i * 1000); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n; int i; long x = 100000; long y, z, w; scanf("%d", &n); for (i = 0; i < n; i++) x = x * 1.05; y = x; y = y / 1000; y = y % 10; z = x; z = z / 100; z = z % 10; w = x; w = w / 10; w = w % 10; if (y > 0 || z > 0 || w > 0) x = (x / 10000) * 10000 + 10000; else x = (x / 10000) * 10000; printf("%d\n", x); return (0); }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (true) { int n = sc.nextInt(); int debt = 100000; for (int i = 0; i < n; i++) { debt = (int)(debt * 1.05); } debt = (debt/1000)*1000; System.out.println(debt); } } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.math.BigDecimal; public class Main { public static void main(String[] args) { BigDecimal shakkin = new BigDecimal(100000); BigDecimal taxper = new BigDecimal(0.05); BigDecimal rishi; int output = 0; for (int i = 0; i <= Integer.parseInt(args[0]); i++) { // 5%の利子を計算する rishi = shakkin.multiply(taxper); // 5%の利子を元金に足す shakkin = shakkin.add(rishi); // 1000円未満を切り上げる output = shakkin.setScale(-3, BigDecimal.ROUND_UP).intValue(); } System.out.println(output); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.math.BigDecimal; /** * ??????????¨???????????????? * * @author kohei.nitta * */ class Debt_hell { /** * ?¨??????\??????????????????????????????n??±?????????????????????????????????????????? * * @param args * @return */ public static int main(String[] args) { BigDecimal debt = new BigDecimal("100000"); BigDecimal interest = new BigDecimal("1.05"); // n??±???????????????????¨?????????? for (int i = 1; i <= Integer.parseInt(args[0]); i++) { debt = calcDebt(debt, interest); } System.out.println(debt); return 0; } /** * ?????????????????????????????????????????? * * @param debt * @param interest * @return ?????????????????????????????????????????´?????? */ private static BigDecimal calcDebt(BigDecimal debt, BigDecimal interest) { BigDecimal roundUp = new BigDecimal("1000"); // ??????????????????1,000 ????????????????????????????????? return debt.multiply(interest).divide(roundUp, 0, BigDecimal.ROUND_UP) .multiply(roundUp); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <stdio.h> int main() { int n,i; unsigned long int debt_price; scanf("%d",&n); debt_price = 100000; for(i=0; i<n; i++){ debt_price *= 1.05; if(debt_price % 1000 ) debt price =(debt_price/1000+1)*1000; } printf("%lu\n",debt_price); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
import std.stdio,std.conv,std.string,std.math; void main(){ double money = 100000; while(true){ char[] buf; stdin.readln(buf); double x = buf.chomp().to!double(); if(0 <= x && x <= 100){ for(int i = 0;i < x;i++){ money *= 1.05; writeln("money:",money.to!int()," calc:",money - (money/1000).to!int()*1000); if(money - (money/1000).to!int() * 1000 != 0){ money = ((money/1000 + 1).to!int())*1000; } } break; }else{ writeln("tryAgain!"); } } writeln(money.to!int()); }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int n, i, x, xx; double sum = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { sum = sum * 1.05; x = sum / 1000; x = x * 1000; if (sum - x > 0) { x = x + 1000; } sum = x; } printf("%d\n", x); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(int argc, const char* argv[]) { int n, i, money = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { money = money * 1.05; } if (money % 1000 != 0) money = ceil(money / 10000 + 1) * 10000; printf("%d\n", money); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n; int re = 100000; int i; scanf("%d", &n); for (i = 0; i < n; i++) { re *= 1.05; printf("%d\n", re); } if (re % 1000 != 0) re = (re + 1000) / 1000 * 1000; printf("%d\n", re); return (0); }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int x; cin >> x; int n = 100000; for (int i = 0; i < x; i++) { n = n / 20 * 21; if (n % 10000 > 0) { n = n - n % 10000; n += 10000; } } cout << n << endl; return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { double i, n, answer, v; int r; scanf("%lf", &n); answer = 100000; for (i = 0; i < n; ++i) { answer += 100000 * 0.05; } v = answer / 10000; answer = floor(v); if (v - answer >= 0.1) { ++answer; } r = answer * 10000; printf("%d", r); }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; int money = 100; cin >> n; for (int i = 0; i < n; i++) { money = money * 1.05 + 0.999; cout << money << endl; } cout << money * 1000 << endl; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main(void) { int a, ans; float b = 100000.0f; std::cin >> a; for (int i = 0; i < a; i++) { b *= 1.05f; b /= 1000; double c = ceil(b); b = c * 1000; std::cout << b << std::endl; } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> int n, i; double debt = 100; int main() { scanf("%d", &n); for (i = 0; i < n; i++) { debt *= 1.05; debt = ceil(debt); } printf("%.0f", debt * 1000); }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main(void) { int i, n; double ans; cin >> n; ans = 100000; for (i = 0; i < n; i++) { ans *= 1.05; ans /= 1000; ans = int(ans + 0.9999999); ans = double(ans) * 1000; } ans = int(ans); cout << ans << endl; return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int i, n, ret; ret = 0; scanf("%d", &n); for (i = 0; i <= n; i++) ret += 100000 * 0.05; printf("%d", ret + 100000); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int a, y, n, money = 100000; scanf("%d", &n); for (a = 0; a < n; a++) { money = money + money / 100 * 5; } y = money % 10000; money = money / 10000; if (y >= 1) { money = money + 1; } money = money * 10000; printf("%d\n", money); return (0); }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int n, i, mny; while (scanf("%d", &n) > 0) { mny = 100000; for (i = 0; i < n; i++) { mny *= 1.05; } if (mny % 10000 > 0) { mny = mny - (mny % 10000) + 10000; } printf("%d\n", mny); } return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <stdio.h> #include <math.h> int main(void){ int n = 0; double debt = 100; /*100 thousand yen*/ int i = 0; scanf("%d", &n); for (i = 0; i < n; i++){ debt = ceil(debt * 1.05); } printf("%d", (int) (debt * 1000); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
m = 10_0000 n = gets.to_i n.times{ m *= 1.05 } cut = m % 10000 m = m - cut + 10000 if cut > 0 puts m.to_i
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
n =gets.to_i puts {(100000+(100000*0.05)*n)}.round(-2)