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
cpp
#include <bits/stdc++.h> int main() { double debt = 100000, add, p = 0.05; int n; std::cin >> n; for (int i = 0; i < n; i++) { add = (double)(int)(((debt * 0.05) / 1000) + 0.999) * 1000; debt += add; } std::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
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, a = 100000, b = 105; cin >> n; for (int i = 0; i < n; i++) { a *= b; a /= 100; } a /= 1000; a *= 1000; cout << a + 10000 << 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 argc, char const* argv[]) { int n; cin >> n; double money = 100000; for (int i = 0; i < n; i++) { money *= 1.05; money /= 1000; money = int(money + 0.9); money *= 1000; } cout << setiosflags(ios::fixed); cout << setprecision(0); 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
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; double debt = 100.000; cin >> n; for (int i = 0; i < n; i++) { debt *= 1.05; debt = (int)(debt + 0.999); } debt *= 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> int main() { int n; double debt; while (std::cin >> n) { debt = 100000; for (int i = 0; i < n; ++i) { debt += debt / 20; debt /= 1000; debt = std::ceil(debt); 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
UNKNOWN
n = gets.chomp.to_i if n <= 100 x = 100000 i = 0 while i < n x += x*5/100 y = x%1000 if y >= 100 x = x-y+1000 end i += 1 end puts x 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
python3
debt=10**5 interest=5/100 n=int(input()) for week in range(n): debt=debt(1+interest)- if debt%1000>0: debt=debt+1000-(debt%1000) 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
using System; namespace _0007 { class Program { static void Main(string[] args) { double debt = 100000; var appointedWeek = int.Parse(Console.ReadLine()); for (int weekCount = 0; weekCount< appointedWeek; weekCount++) { debt = debt * (1.00 + 0.05); } var rest = debt % 10000; debt = debt - rest + 10000.0; Console.Write("{0}\n",(int)(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
p 13430000
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
// clang-format off #include <bits/stdc++.h> #define int long long #define main signed main() // #define main int main() #define loop(i, a, n) for (int i = (a); i < (n); i++) #define rep(i, n) loop(i, 0, n) #define all(v) (v).begin(), (v).end() #define rall(v) (v).rbegin(), (v).rend() #define prec(n) fixed << setprecision(n) #define stlice(from, to) substr(from, (to) - (from) + 1) #define pb push_back #define mp make_pair #define mt make_tuple #define fi first #define se second using namespace std; using pii = pair<int, int>; using vi = vector<int>; using vd = vector<double>; using vc = vector<char>; using vb = vector<bool>; using vs = vector<string>; using vpii = vector<pii>; using vvi = vector<vi>; using vvb = vector<vb>; using vvpii = vector<vpii>; template<typename A> using fn = function<A>; constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000; constexpr int MOD = 1000000007; constexpr double PI = acos(-1); template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; } template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; } constexpr bool odd(const int &n) { return n & 1; } constexpr bool even(const int &n) { return !odd(n); } template<typename V> constexpr typename V::value_type sum(const V &v) { return accumulate(all(v), 0); } void solve(); main { solve(); return 0; } // clang-format on void solve() { int n; cin >> n; int x = 100000; rep(i, n) { x = (x * 105 / 100 + 5000) / 10000 * 10000; } cout << x << 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
a=100000gets.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
console.log(Math.ceil(100*Math.pow(1.05,(x=require('fs').readFileSync('/dev/stdin','utf8'))))*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
using System; class main { static void Main(String[] args) { double n = double.Parse(Console.ReadLine()); double b = 100000; for (int i = 0; i < n; i++) { b = b * 1.05; b = (Math.Ceiling(b / 1000))*1000; } Console.WriteLine(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
UNKNOWN
#include <bits/stdc++.h> int main(void) { double a = 100000; double b; int i, n; scanf("%d", &n); for (i = 0; i < n; i++) a *= 1.05; a /= 10000; b = round(a) * 10000; printf("%.0f\n", b); 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 week, money = 100, i; double tmp; scanf("%d", &week); for (i = 0; i < week; i++) { tmp = money * 0.05; while (tmp >= 1.0) { tmp--; money++; } if (tmp >= 0.1) money++; } printf("%d", money * 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
n =gets.to_i puts ((100000+(100000*0.05)*n)).round(-2)
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 i, n, debt; debt = 100000; cin >> n; for (i = n; i > 0; i--) { debt = debt * 1.05; if (debt % 1000 != 0) { debt = debt / 1000; debt = debt * 1000 + 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
java
mport java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); //外部入力取り込んだ借金をしている期間(週単位) int week = Integer.parseInt(in.readLine()); //借金 double debt = 100000; //利子 double interest = 1.05; //借金の計算 for (int i = 0; i < week; i++) { //一週間ごとに 借金に5% の利子を借金に加える debt = debt * interest; //借金の 1,000 円未満を切り上げ debt = Math.ceil(debt/1000); debt = debt * 1000; } //計算後の借金を整数として外部出力 System.out.println((int)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> using namespace std; int main() { int n; double rm = 100000; int i; while (cin >> n) { for (i = 0; i < n; i++) { rm *= 1.05; rm /= 1000; rm += 0.9; rm = (int)rm; rm *= 1000; } cout << rm << 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 w, i; long int result = 100000; scanf("%d", &w); for (i = 0; i < w; i++) { result *= (0.05 + 1.0); result = ((result + (1000 - 1000 / 10)) / 1000) * 1000; } printf("%ld\n", result); 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; int i; int x = 100000; scanf("%d", &n); for (i = 1; i <= n; i++) { x = (int)x * 1.05; } if (x % 10000 != 0) x = ((int)x / 10000) * 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
UNKNOWN
#include <bits/stdc++.h> int main(void) { int Money = 100000, risi, n, i; scanf("%d", &n); for (i = 1; i <= n; i++) { Money *= 1.05; if (Money % 1000 > 1) { Money /= 1000; 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; void test(); int interest(int debt, float interest_rate, int n); int main(void) { test(); return 0; } void test() { int debt, n; float interest_rate; debt = 100000; interest_rate = 1.05; cin >> n; debt = interest(debt, interest_rate, n); if (debt % 1000 > 0) { debt = debt - debt % 1000 + 1000; } cout << debt << endl; } int interest(int debt, float interest_rate, int n) { if (n == 1) return debt * interest_rate; else return interest(debt, interest_rate, n - 1) * interest_rate; }
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 a; int x = 100; for (; a > 0; a--) { x = ceil((float)x * 1.05); printf("%d\n", x); } printf("%d\n", 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
cpp
#include <bits/stdc++.h> int main() { int n, k = 100000; scanf("%d", &n); for (; n >= 0; n--) { k *= 1.05; if (k % 1000) { k += 1000; } k = k - k % 1000; } printf("%d", k); 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 money = 100000; int i; int tmp; scanf("%d", &n); for (i = 0; i < n; i++) { money += money * 0.05; } tmp = money % 10000; money /= 10000; money *= 10000; tmp /= 100; tmp %= 10; if (tmp >= 5) { 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
cpp
#include <bits/stdc++.h> using namespace std; int main(void) { int i, week; int ans = 100000; cin >> week; for (i = 0; i < week; i++) { ans = ans * 1.05; if (ans % 1000 < 500) { ans = ans - ans % 1000; } else { ans = ans + (1000 - ans % 1000); } } cout << ans << 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
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigDecimal; public class DebtHell { /** 元金 */ static final BigDecimal capital = BigDecimal.valueOf(100000); /** 利子 */ static final BigDecimal interest = BigDecimal.valueOf(0.05); /** 率 */ static final BigDecimal rate = BigDecimal.valueOf(1).add(interest); /** * プログラミングコンテスト * 初級編:Debt Hell(借金地獄) * @param args * @throws IOException */ public static void main(String[] args) throws IOException { InputStreamReader is = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(is); String input = br.readLine(); // ユーザに入力:何週間後の借金を出力するのか int weeks = Integer.valueOf(input); // 計算結果の初期値に元金を格納 BigDecimal result = capital; for (int i = 0; i < weeks; i++) { // 利子を考慮した率をかけ、1000円未満を切り上げる result = roundUpLowerThousand(rate.multiply(result).setScale(0, BigDecimal.ROUND_UP)); } System.out.println(result); } /** * 対称の数値の1000未満を切り上げをして返却 * * @param target 対称数値 * @return 切り上げした結果 */ private static BigDecimal roundUpLowerThousand(BigDecimal target) { // 計算に使用する基準数(1000) BigDecimal basisNumber = BigDecimal.valueOf(1000); BigDecimal result = target.divide(basisNumber).setScale(0, BigDecimal.ROUND_UP); return result.multiply(basisNumber); } }
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;main(d){for(d=scanf("%d",&n)+99;n--;d=d/.95+.99);n=!printf("%d\n",d*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.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; while(n != 0){ mon = Math.ceil(m * 1.05); n--; } 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<stdio.h> int main(void) { int i,n,j,k; double debt = 100000; scanf("%d",&n); for (i = 0; i < n; i++) { debt = debt*1.05; j = debt; j = j / 1000 + 1; debt = j * 1000; } k=debt printf("%d\n", k); 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 calcDebtByWeek(int); int main(void) { for (int n; cin >> n; cout << calcDebtByWeek(n)) ; return 0; } int calcDebtByWeek(int n) { int currentDebt = (int)1e5; while (n--) { currentDebt = int(currentDebt * 1.05); if (currentDebt % 1000) { currentDebt /= 1000; currentDebt++; currentDebt *= 1000; } } return currentDebt; }
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.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); double rate = 0.05 * (sc.nextInt()); double money = 100000 + (100000*rate); //System.out.println(rate+" "+(100000*rate)); if(money%10000!=0){ money = money + (10000 - (money%10000)); } System.out.println((int)money); } }
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 { public static void main(String[] args) throws IOException { // 宣言 double money = 100000; final double rate = 1.05; int amari = 0; // 文字列の入力 BufferedReader input = new BufferedReader(new InputStreamReader(System.in), 1); int week = Integer.parseInt(input.readLine()); for (int i = 1; i < week; i++) { // 5%の利子を加算し、1000円未満を切り上げる money = money * rate; amari = (int) money % 1000; if (amari != 0) { money = money + 1000; money = money - amari; } } System.out.println((int)money); } }
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 NumOfWeeks; int CurrentDebt = 100000; scanf("%d", &NumOfWeeks); int i; for (i = 0; i < NumOfWeeks; i++) { CurrentDebt = (CurrentDebt / 20 + CurrentDebt + 999) / 1000 * 1000; } printf("%d", CurrentDebt); 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.*; class Main{ public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); double x = Double.parseDouble(br.readLine()); double y = 100000; long z = 0; for (long i=0; i<x; i++) { y = y + (y * x/100); y = y /1000; y = Math.ceil(y); y = y * 1000; z = (long)y; } System.out.println(z); } }
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 <math.h> int main(){ int n; int debt = 100000; std::cin >> n; for(int i=0; i<n; i++){ debt = round((double)debt * 1.05); int under = debt % 1000; if(under==0) else{ debt = debt - under + 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
cpp
#include <bits/stdc++.h> using namespace std; int n; double sum; int main() { sum = 100000; scanf("%d", &n); for (int i = 0; i < n; i++) { sum += 0.05 * sum; sum = ceil(sum / 1000) * 1000; } int ans = (int)sum; printf("%d", 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
cpp
#include <bits/stdc++.h> int main() { double debt = 100000, add, n, p = 0.05; std::cin >> n; for (int i = 0; i < n; i++) { add = (double)(int)(((debt * 0.05) / 1000) + 0.999) * 1000; debt += add; } std::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
python2
a,i=5,100 import math while a!=0:a,i=a-1,math.ceil(i*1.05)
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, a, k, d = 100000; scanf("%lf", &a); for (i = 0; i < a; i++) { k = d * 0.05; d = k + d; } d = ceil(d * 0.0001); d = d * 10000; printf("%.0lf\n", d); 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 Debt = 100000; std::cin >> n; for (int i = 0; i < n; i++) { Debt = Debt * 1.05 / 1000; Debt = ceil(Debt); Debt = Debt * 1000; } std::cout << Debt << 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
java
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); while(scan.hasNext()){ int x = scan.nextInt(); int n = 100000; for(int i = 0;i < x;i++){ n = n + (int)(n*0.05); } n = n - (n % 10000) + 10000; System.out.println(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
UNKNOWN
using System; class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); double money = 1000; for (int i = 0;i < n+1; i++) { money = Math.Floor(money*1.05); } Console.WriteLine(money*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.*; public class Main { public static void main(String[] argv) throws IOException { //* BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); while(true) { String s = in.readLine(); if (s == null) { break; } f(s); } //*/ } public static void f(String s) { int week = Integer.parseInt(s); double loan = 100000; for (int i = 0; i < week; i++) { loan *= 1.05; } System.out.println(Math.round(loan / 10000) * 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
python3
import math result = 100000 for i in range(int(input())): result *= 1.05 print(math.ceil(result/10000)*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 <bits/stdc++.h> using namespace std; int main(void) { int n; double ans; cin >> n; ans = 100 * pow(1.05, n); if ((ans - int(ans)) > 0.0) ans++; 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
cpp
#include <bits/stdc++.h> using namespace std; int n, utang, bunga; int main() { utang = 100000; cin >> n; for (int i = 1; i <= n; i++) { bunga = utang * 5 / 100; if (bunga % 1000 == 0) bunga = bunga / 1000 * 1000; else bunga = bunga / 1000 * 1000 + 1000; cout << bunga << "\n"; utang = utang + bunga; } cout << utang << "\n"; 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 <iostream> using namespace std; int main() { unsigned long long debt = 100000; int n; for (int i = 0; i < n; ++i) { debt *= 1.05; const int under debt -= (debt % 2000) - 2000; } 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
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str; int n; double money = 100000; System.out.println("??´??°n?????\???:"); str=br.readLine(); n=Integer.parseInt(str); while(n>0){ money = money*1.05; money = (Math.ceil(money/1000))*1000; n--; } System.out.printf("%.0f",money); } }
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 = 100000; public static void main(String[] args) throws IOException { int n; double hell = debt; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); n = Integer.parseInt(br.readLine()); for (int i = 1; i <= n; i++) { hell += debt * 0.05F; hell = Math.ceil(hell / 100) * 100; } System.out.println((int) hell); } }
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; cin >> n; int loan = 100000; for (int i = n; i > 0; i--) { loan = ceil((loan * 1.05) / 1000.0) * 1000; } cout << loan << '\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> using namespace std; int main() { int n; double debt = 100000; double temp = 100000; cin >> n; for (int i = 0; i < n; i++) { debt *= 1.05; } for (int j = 0;; j++) { temp += 10000; if (temp > debt) { break; } } cout << temp << 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; inline int ceil(double x, double base) { return ceil(x / base) * base; } int main() { ios::sync_with_stdio(false); int n; cin >> n; cout << ceil(100000.0 * pow(1.05, n), 10000.0) << "\n"; 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 = 0; j < i; j++) { a = a * 1.05; k = a % 1000; 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
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /** * Debt Hell * @author */ public class Main { public static void main(String args[]){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); try { int shakkin = 100000;//?????? int rishi = 5;//?????? int n = Integer.parseInt(br.readLine());//N??±??????????????? System.out.println(getShakkin(shakkin, rishi, n));//???????????¨????????? } catch (Exception e) { e.printStackTrace(); } } /** * N??±???????????????????????????????????? * @param gankin * @param rishi * @param n * @return */ public static int getShakkin(int gankin, int rishi , int n){ int span = 7;//???????????????????????? int result = gankin;//N??±??????????????? for(int i = 0; i < n; i++){ result = result + (result*rishi/100);//????????????????????? } result = (result/ 1000 )* 1000;//1000????????????????????? return 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; scanf("%d", &n); double base = 100000; for (int i = 0; i < n; i++) { base *= 1.05; if ((int)base < 1000 && (int)base % 1000 != 0) { int tmp = (int)base / 1000; base = tmp * 1000 + 1000; } } printf("%d\n", (int)base); }
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; int sum; sum = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { sum *= 1.05; } if (sum % 10000 != 0) { sum /= 10000; sum += 1; sum *= 10000; } printf("%d\n", 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) { int i, j, n; double debt; scanf("%d", &n); for (i = 0; i < n; i++) { debt = debt * 1.05; j = debt; if ((debt - j) == 0.000) { j = j / 1000; debt = j * 1000; } else { j = j / 1000 + 1; debt = j * 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
main(){printf("%d",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
cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using vi = vector<int>; using vvi = vector<vi>; using vvvi = vector<vvi>; using pii = pair<int, int>; using pis = pair<int, string>; using psi = pair<string, int>; using D = double; const int Max = 10000000; bool prime[Max]; int main(void) { int n, sum = 100000; cin >> n; for (int i = 0; i < n; i++) { sum = 1.05 * sum; sum = (sum / 1000 + 1) * 1000; } cout << sum << 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<iostream> int main(){ int n,a,i std::cin>>n; for(a=100000,i=0;i<n;++i){ a=a+a/20; if(a%1000=0){ a=a+1000-a%1000 } ++a } std::cout<<a<<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
python2
ans = 100000 n = int(raw_input()) for i in xrange(n): ans *= 1.05 ans = ((ans+999)/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
cpp
#include <bits/stdc++.h> using namespace std; int ans = 1000; int main() { int n; while (cin >> n) { for (int i = 0; i < n; i++) { ans *= 1.05; } cout << ans * 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(void) { int num = 100000, n, i; scanf("%d", &n); if (n <= 100 || n > 0) { for (i = 1; i <= n; i++) { num = num * 1.05; } num = num / 10000; num = num + 1; num = num * 10000; printf("%d\n", num); } 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 week, fraction; cin >> week; double debt = 100000; double const rate = 1.05; for (int i = 0; i < week; i++) { debt = debt * rate; fraction = (int)debt % 1000; if (fraction > 0) { debt = debt + 1000 - fraction; } } 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
UNKNOWN
n =gets.to_i puts( (100000+(100000*0.05)*n)).round(-3)
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 += 100000.0 * 0.05; 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> int main(void) { int n, ans = 100000; std::cin >> n; for (int i = 0; i < n; i++) ans *= 1.05; int t = ans % 1000; ans = ans - t + 1000; std::cout << ans << 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
cpp
#include <bits/stdc++.h> using namespace std; 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 /= 1000; start = ceil(start); start *= 1000; 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 year; long int money = 100000; cin >> year; for (int i = 1; i <= year; i++) { money += money * 0.05; } if (money % 1000 > 0) { money /= 10000; money++; money *= 10000; } 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> int main(void) { int n; int a = 100000; scanf("%d", &n); for (; n >= 0; n--) { a *= 1.05; } printf("%d\n", ((a + 5000) / 10000) * 10000); 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 Control.Applicative main = do w <- read <$> getLine print $ show $ (ceiling $ ((1.05^w)*10))*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 <bits/stdc++.h> using namespace std; int a; int main() { cin >> a; double c = 100000.0; for (int i = 0; i < a; ++i) { c = c * 1.05; c = ceil(c * 0.001); c = c * 1000; } cout << c << 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
java
import java.util.Scanner; public class Main { // Round by 3 digits static float roundUp(float value) { float mod = value % 1000; if (mod > 0) { value = value + (1000 - mod); } return value; } public static void main(String[] args) { float gankin = 100_000f; Scanner sc = new Scanner(System.in); int nweek = sc.nextInt(); float debt = gankin; for (int i = 0; i < nweek; i++) { debt = roundUp(debt * 1.05f); } System.out.printf("%d\n", 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
class DebtHell { public static void main(String[] args) { int result = 100000; if (!"0".equals(args[0])) { int n = Integer.parseInt(args[0]); for(int i = 0; i < n;i++){ result =(int)(result + (result * 0.05)); if((result % 1000) != 0 ){ result = ((int)(result / 1000) + 1) * 1000; } } } System.out.println(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; int m = 100000; cin >> n; for (int i = 0; i < n; ++i) { m = (m * 1.05 + 999) / 1000; m = m * 1000; } cout << m; 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 x = 100000; int i, n; scanf("%d", &n); for (i = 0; i < n; i++) { x = x * 1.05; } if (x % 10000 != 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
main = do n <- readLn :: IO Int let debt x = 100 * ceiling $ x * 0.0105 print $ iterate n debt x !! 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
public class DebtHell { public static void main(String[] args) { int result = 100000; if (!"0".equals(args[0])) { int n = Integer.parseInt(args[0]); for(int i = 0; i < n;i++){ result =(int)(result + (result * 0.05)); if((result % 1000) != 0 ){ result = ((int)(result / 1000) + 1) * 1000; } } } System.out.println(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
java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); //??????10?????? int debt = 100000; //n??±??? int n = scanner.nextInt(); for(int i=0; i<n; i++){ debt *= 1.05; } System.out.println(roundOff(debt)); } public static int roundOff(int debt){ String strDebt = String.valueOf(debt); int splitDebt = Integer.parseInt(strDebt.substring(strDebt.length()-4)); if(0<splitDebt){ debt = (debt+10000) - splitDebt; } 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; public class Main { /** * ??????????????????????????? * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0007&lang=jp * * @param args */ public static void main(String args[]) { Scanner in = new Scanner(System.in); double inputNum = in.nextDouble(); // ????????????????????????????????????????????? System.out.println(getNowShakkin((int) inputNum)); } /** * 1000?????§?????????????????´??°???????????????????????? * * @param inputNum */ public static int getKiriage1000(int inputNum) { int result = inputNum;//?????????????????????????????£??\?????? result = (int) (Math.ceil((double) result / 1000) * 1000); return result;//1000??\????????????????????????????????? } /** * ??????????????????????????¨?????????????????????????????? * * @param inputNum * @return */ public static int getNowShakkin(int weekInterval) { int result = 10000;//????????????100000?????§???????????? double rishi = 0.05;// ?????????5%??§???????????? //???????????????????????????????????????????????? for (int i = 0; i < weekInterval; i++) { result = result + (int) (result * rishi); } result = getKiriage1000(result);// 1000?????\????????????????????? return 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> static bool input(int& n) { if (0x00 == &n) { std::cerr << "n is null" << std::endl; return false; } std::string tmp(""); char c = 0; std::cin >> c; if (std::isdigit(static_cast<int>(c))) { tmp = c; n = std::atoi(tmp.c_str()); } return true; } static double calcBalanceOfDebt(int n) { double balance = 100000; for (int i = 1; i <= n; i++) { balance *= 1.05; balance = ceil(balance / 1000) * 1000; } return balance; } int main() { int num = 0; input(num); std::cout << calcBalanceOfDebt(num) << 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
UNKNOWN
#include <stdio.h> int main() { int n,i; unsinged long int debt_price; scanf("%d",&n); debt_price = 100000; for(i=0; i<n; i++){ debt_price *= 1.05; debt_price = debt_price/1000 * 1000 +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
#include <bits/stdc++.h> int main() { int n; while (scanf("%d", &n) != EOF) { long int debt = 100000; int i; for (i = 0; i < n; i++) { debt *= 1.05; if (debt % 10000 != 0) { debt += 10000; debt -= debt % 10000; } } printf("%ld\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
UNKNOWN
#include <bits/stdc++.h> int main(void) { int i, j, n; double debt = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { j = debt * 1.05; double d = debt * 1.05 / 1000; j = j / 1000; if ((d - (double)j) == 0.00) { debt = j * 1000; } else { j = j + 1; debt = j * 1000; } } printf("%lf", 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 = do n <- readLn print $ (ceiling (1.05^n * 10)) * 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
using System; class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); double money = 1000; for (int i = 0;i < n; i++) { money = Math.Floor(money*1.05); } Console.WriteLine(money*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 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int debt = 100000; int n = Integer.parseInt(br.readLine()); for (int i = 0; i < n; i++) { debt *= 1.05; if ((debt - ((debt/1000) * 1000))!=0) { debt = (debt/1000) * 1000 + 1000; } else { debt = (debt/1000) * 1000; } } System.out.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() { int i; int n; int kei; scanf("%d", &n); if (n > 100 && n < 0) { return 0; } kei = 100000; for (i = 0; i < n; i++) { kei = 1.05 * kei; } printf("%d\n", kei - kei % 1000 + 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 i, n; double ans; cin >> n; ans = 100.000; for (i = 0; i < n; i++) { ans *= 1.05; cout << i + 1 << ":::" << ans << "->"; ans = (int)(ans + 0.999); cout << ans << "->"; ans = (double)ans; cout << ans << endl; } ans *= 1000; 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; int debt = 100000; int i; scanf("%d", &n); for (i = 0; i < n; i++) { debt *= 1.05; if (debt % 1000 != 0) { debt += -debt % 1000; } } 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> using namespace std; int main() { int n; while (scanf("%d", &n) != EOF) { double ans = 10; while (n--) { ans = ans * 1.05; } printf("%d0000\n", (int)(ans + 1.0)); } 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; public class Main { public static void main(String args[]) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int result = 100000; int rishi = 5; int n = Integer.parseInt(br.readLine()); for(int i = 0; i < n; i++){ result = result + (result*rishi/100); } while(result % 10000 != 0){ result++; } System.out.println(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 argc, const char* argv[]) { cin.tie(0); ios::sync_with_stdio(false); long n = 0; cin >> n; long rest = 100000; for (int i = 0; i < n; i++) { rest *= 1.05; if (rest % 1000 != 0) { rest = rest + 1000 - rest % 1000; } } printf("%ld", rest); 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 m = 100000, i, w; scanf("%d", &w); for (i = 0; i < w; i++) { m *= 21; m /= 20; if ((w % 1000) != 0) { w / 1000; w *= 1000; w += 1000; } } printf("%d", m); 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<stdio.h> main(void){ int money = 100000, num; double moneyDouble; scanf("%d", &num); for( ; num >= 0; num--){ money += 100000 * 0.05; } moneyDouble = money / 10000; money = (moneyDouble + 0.9); money = money * 10000; 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() { double a; cin >> a; int ans = 100000; for (int b = 0; b < a; b++) { double rev = 0; ans = ans * 1.05; rev = ans % 1000; ans = ans - rev; ans = ans + 1000; } printf("%.1500000lf\n", 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
UNKNOWN
n = gets.to_i debt = 10**5 n.times { debt*=1.05 debt = (debt/ 1000.0).ceil * 1000.0} puts debt