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 calc(int n); int main() { int n; scanf("%d", &n); printf("%d\n", calc(n + 1)); return 0; } int calc(int n) { int a; a = 100000; for (; n > 0; n--) { a *= 1.05; if (a % 1000 != 0) { a = a - (a % 1000) + 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() { int n, m; cin >> n; m = 100000; m = (((m / 100) * 5) * n) + m; if (m % 1000 != 0) { m = m - (m % 1000) + 1000; } cout << 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 = 0; cin >> week; int a = 100000; for (int i = week; i--;) { a *= 1.05; } a = (int)(a * 0.0001 + 0.9) * 10000; 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<stdio.h> int main{ int n; int i; int ans; int a = 100000; scanf("%d", &n); for(i = n; i >= 1; i--){ ab *= 1.05; if(ab % 1000 > 0){ ans = ab / 1000 + 1 * 1000; }else{ ans = ab; } } printf("%d\n", 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<stdio.h> main(void){ int money = 100000, num; double moneyDouble; scanf("%d", &num); for( ; num >= 0; num--){ money += money * 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
UNKNOWN
#include<stdio.h> #include<stdlib.h> #include<string.h> int i,j,n; __int64 ans=100000; int main(){ scanf("%d",&n); for(i=0;i<n;i++){ ans*=1.05; if(ans%1000!=0)ans-=ans%1000,ans+=1000; } printf("%lld\n",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
java
import java.io.IOException; public class Main { public static void main(String[] args) throws IOException { int intInputWeek = Integer.parseInt(args[0]); // 借金計算 double totalDebt = calcDebt(100000, intInputWeek); System.out.println((int)totalDebt); } /** * 借金計算メソッド(週利0.05%) * @param debt 現在の借金 * @param week 現在の残り週 * @return 借金額 */ private static double calcDebt(double debt, int week) { if (week == 0) { return debt; } debt *= 1.05; // 1000円未満は切り上げる double debtPlus = debt / 1000 - (int) (debt / 1000); if (debtPlus > 0) debt = debt + 1000 - debtPlus * 1000; return calcDebt(debt, --week); } }
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); int i; long long int total = 100000; for (i = 0; i < n; i++) { total = total * 1.05; total = total / 100.0; if (total % 10 != 0) total = total + (10 - (total % 10)); total = total * 100; } printf("%lld\n", 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
cpp
#include <bits/stdc++.h> int main(void) { int n; scanf("%d", &n); int coin = 100000; for (int m = 0; m < n; m++) { coin += coin * 0.05; coin = (coin / 1000) + (coin % 1000) > 0 ? 1000 : 0; } printf("%d\n", coin); 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() { unsigned int n; cin >> n; double a = 100000; for (int i = 0; i < n; i++) { a *= 1.05; a /= 1000; a = floor(a); a *= 1000; } cout << a << 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
n = input() a = 100000 for i in range(1,int(n)+1): a = int(a*1.05) print(a) if(a%1000 > 0): a = 1000*int(a/1000) + 1000 print(a) print(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
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, d = 100000; cin >> n; for (int i = 0; i < n; i++) { d *= 1.05; if (d % 1000 > 0) d -= (d % 1000) + 1000; } cout << d << '\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
n;main(d){for(d=scanf("%d",&n)+99;n-=1;d=ceil(d*1.05));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
UNKNOWN
#include <bits/stdc++.h> int main(void) { int sum = 100000, i, data; scanf("%d", &data); for (i = 0; i < data; i++) { sum = sum + (sum * 0.05); if (0 != sum % 1000) { sum = sum + 1000; } else { } } sum = sum / 10000; sum = sum * 10000; printf("%d", 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
cpp
#include <bits/stdc++.h> using namespace std; int roundUp(int x, int index); int main(void) { int i; int n; double intrst; int debt; cin >> n; debt = 100000; intrst = 0.05; for (i = 0; i < n; i++) { debt *= 1.0 + intrst; debt = roundUp(debt, 4); } cout << debt << endl; return 0; } int roundUp(int x, int index) { int exp10; exp10 = pow(10, index - 1); x += exp10 - exp10 / 10; x /= exp10; x *= exp10; return x; }
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.util.Scanner; public class Main { private static final int debt = 100000; public static void main(String[] a) throws IOException { Scanner sc = new Scanner(System.in); int debtSum; int interest = (int) (debt * 0.05); int duration = sc.nextInt(); debtSum = duration * interest + debt; debtSum=(int) Math.ceil((double) debtSum / 10000) * 10000; System.out.println(debtSum); } }
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 Main { public static void main(String[] args) throws IOException { // 宣言 BigDecimal shakkin = new BigDecimal(100000); BigDecimal taxper = new BigDecimal(0.05); BigDecimal rishi; int output = 0; // 文字列の入力 BufferedReader input = new BufferedReader(new InputStreamReader(System.in), 1); int week = Integer.parseInt(input.readLine()); //金額計算 for (int i = 0; i <= week; 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
UNKNOWN
i;main(){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 n, i, a, temp; a = 100000; scanf("%d", &n); for (i = 1; 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 a, i, n; a = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { a = a + 5000; } a = a + 1; a = a / 1000; a = a * 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
package main import ( "fmt" "os" "bufio" "strconv" "math" ) func main() { scanner := bufio.NewScanner(os.Stdin) for scanner.Scan() { n, _ := strconv.Atoi(scanner.Text()) debt := 100000 * math.Pow(1.05, float64(n)) fmt.Println(math.Ceil(debt*0.0001)*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> struct yami { double kinri; int fusai; }; int main(void) { int i, week; struct yami a; a.kinri = 0.05; a.fusai = 100000; scanf("%d", &week); for (i = 0; i < week; i++) { a.fusai *= (1 + a.kinri); } if (a.fusai % 10000 != 0) { a.fusai /= 10000; a.fusai += 1; a.fusai *= 10000; } printf("%d\n", a.fusai); 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> void roundup_sen(int *money) { int excess, i = 1, add; int power; while (i < 4) { i++; power = pow(10, i); excess = (*money % power); *money -= excess; if (excess > 4) { add = power; *money += add; } } } int main(void) { int money = 100000; int week; scanf("%d", &week); money += money * 0.05 * week; roundup_sen(&money); 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, rest; double ans = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { ans *= 1.05; } rest = (int)ans % 10000; if (rest != 0) { ans += (10000 - rest); } 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
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.99999; 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
UNKNOWN
var weeks = 5; var startPercentage = 100; console.log(calculateDebt(startPercentage, weeks)); function calculateDebt(number, weeks){ for (var i = 0; i < weeks; i++) { number = Math.ceil(number * 1.05); } return number * 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() { float a, n, i, b, j, ans = 0; a = 100000; cin >> n; for (i = 1; i <= n; i++) { a = a * 1.05; } for (i = 1; 1000 <= a; i++) { a = a - 1000; } ans = i * 1000; if (a = !0) ans = ans + 1000; 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
python2
import math price = 100000.0 n = int(raw_input()) for i in range(n): price = ceil((price * 1.05) / 1000) * 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 <iostream> int main(){ int n; while(std::cin >> n){ double result=100; while(n--){ result*=1.05; if(result%1000!=0)result+=1000-result%1000; } result*=1000; std::cout << (int)result << 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() { int n, money = 100000; cin >> n; for (int i = 0; i < n; i++) { money = money * 1.05; if (money % 1000) money = money / 1000 * 1000 + 1000; } cout << 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
cpp
#include <bits/stdc++.h> int main() { int n; scanf("%d", &n); int a = 100000; for (int i = 0; i < n; i++) { a *= 1.05; if (a % 1000 != 0) { a = (a / 1000) * 1000; a += 1000; } } printf("%d", 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
python2
from math import ceil def roundint(num): fnum = float(num) inum = int(ceil(fnum * 0.0001) * 10000) return inum debt = 100000 n = input() debt += debt*0.05*n print roundint(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 i, n; int money = 100000; cin >> n; for (i = 1; i <= n; i++) { money *= 1.05; money = (money + 999) / 1000 * 1000; } cout << 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 = 100000, money; cin >> money; for (int i = 0; i < money; i++) { n *= 1.05; n += 999; n -= n % 1000; } cout << 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
import std.stdio,std.conv,std.string,std.math; void main(){ char[] buf; stdin.readln(buf); double x = buf.chomp().to!double(); double money = 100000; if(0 <= x && x <= 100){ for(int i = 0;i < x;i++){ money *= 1.05; } } writeln(roundup(money)); } int roundup(double x){ int result = 0; result = ceil(x/10000).to!int(); 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
UNKNOWN
#include <stdio.h> int main(void) { int i,j,n,k=1; i=100000; scanf("%d",&n); if(n==0){ printf("%d\n",i); return 0;} do{ j=i*0.05; i+=j; if(i%1000!=0)i=i+1000-(i%1000); k++; }while(k<=n); printf("%d\n",i); return
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; /** * ??????????¨???????????????? * * @author kohei.nitta * */ class Debt_hell { /** * ?¨??????\??????????????????????????????n??±?????????????????????????????????????????? * * @param args * @return * @throws IOException */ public static void main(String[] args) throws IOException { 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
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, debt = 100000; cin >> n; for (int i = 0; i < n; i++) { debt *= 1.05; } 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.chomp.to_i sum = 100000 for i in 1..n sum = sum * 1.05 amari = sum%1000 if amari!=0 sum = sum + 1000 - amari end end print sum.to_i.to_s
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 = 10; double risi = 0.05; cin >> n; for (int i = 0; i < n; i++) debt += debt * risi; cout << ceil(debt) * 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
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; double a = 100; cin >> n; while (n--) { a = ceil(a + a * 5 / 100); } cout << a * 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() { int a, i; float yen = 100000; scanf("%d", &a); for (i = 0; i < a; i++) { yen *= 1.05f; } yen = (int)yen + 5000; printf("%d\n", (((int)yen / 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
UNKNOWN
#include <stdio.h> #define DEBT 100000 #define RATE 1.05 //?????????????????? int addrate(int n){ int i; int debtmoney = DEBT; for (i = 0; i < n; i++) { debtmoney *= RATE; } return debtmoney; } //???????????§?????¨?????\ int aboutcalc(int m){ int moneycopy = m; while (moneycopy >= 10000) { moneycopy -= 10000; } if (moneycopy >= 5000) { m += 10000; m -= moneycopy; } else { m -= moneycopy; } return m; } int main(void){ int n; scanf("%d", &n); printf("%d\n", aboutcalc(addrate(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 <bits/stdc++.h> #pragma GCC optimize "O3" using namespace std; inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template <class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); } template <class T> inline T sqr(T x) { return x * x; } template <class T> inline void setmax(T &a, T const &b) { a = max(a, b); } template <class T> inline void setmin(T &a, T const &b) { a = min(a, b); } template <class T> T sq(T x) { return x * x; } template <class T> T clamp(T a, T l, T r) { return min(max(a, l), r); } const double EPS = 1e-10; const double PI = acos(-1.0); const int debt = 100000; int solve(int n) { n++; int interest = debt * n; interest /= 20; return debt + interest + EPS; } int main(int argc, char *argv[]) { int n; while (cin >> n) { cout << solve(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() { 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
cpp
#include <bits/stdc++.h> using namespace std; int main(void) { int n, A = 100000, b, a1, b1, A1 = 100000; cin >> n; for (int i = 0; i < n; i++) { b1 = A * 0.05 / 1000; a1 = b1 * 1000 + 1000; A1 += a1; } cout << A1 << "\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
#include <bits/stdc++.h> int main(int argc, const char* argv[]) { int n, i; double money = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { money = money * 1.05; } money = ceil(money / 10000) * 10000 + 0; printf("%d\n", (int)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
python2
a,i=int(input()),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
cpp
#include <bits/stdc++.h> using namespace std; int main() { unsigned int week; cin >> week; float debt = 100; for (int i = 0; i < week; i++) { debt *= 1.05; debt = ceil(debt); } 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
cpp
#include <bits/stdc++.h> int main(void) { int n, m; m = 100000; scanf("%d", &n); while (n > 0) { m = (m * 105) / 100; if (m % 1000 > 0) { m = ((m / 1000) + 1) * 1000; } n--; } 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
java
import java.io.BufferedReader; import java.io.InputStreamReader; class Main { public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = br.readLine(); int n = Integer.parseInt(line); int money = 100000; for(int i=0;i<n;i++){ money *= 1.05; String temp = money + ""; System.out.println(temp); int len = temp.length(); if((!temp.substring(len-1, len).equals("0")) || (!temp.substring(len-2, len-1).equals("0")) || ((!temp.substring(len-3, len-2).equals("0")))){ money = ((money / 1000) + 1) * 1000; } } System.out.println(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
cpp
#include <bits/stdc++.h> using namespace std; int n; double rent = 100000; int main() { cin >> n; for (int i = 0; i < n; i++) { rent = rent * 1.05; rent = rent / 1000; rent = rent + 0.9; rent = (int)rent; rent *= 1000; } printf("%.0lf", rent); 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 namespase std; int main () { int n, i; double a = 100000; cin >> n; for(i=0;i<n;i++) { a *= 1.05; while(a%1000!=0) { a += 1; } } cout << a << 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
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
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 % 10000 != 0) money = (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 charge(int debt) { debt += debt * 0.05; return debt; } int main(int argc, const char* argv[]) { int debt = 100000; int i = 0, n; scanf("%d", &n); while (i++ < n) { debt = charge(debt); } debt = (debt / 1000) * 1000 + 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
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n; while (feof(stdin) == 0) { scanf("%d", &n); double sum = 100000.0; int i; for (i = 0; i < n; i++) { sum = sum * 1.05; sum /= 1000.0; sum = ceil(sum); sum *= 1000.0; } int sum_i = (int)sum; printf("%d\n", sum_i); } 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; double y; scanf("%f", &n); printf("%f", 100000 * pow(1.05, y)); 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; long int lastmoney; double money = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { money += money * 0.05; } money /= 10000; money = ceil(money); money *= 10000; lastmoney = (int)money; printf("%ld\n", lastmoney); 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.io.BufferedReader; import java.io.InputStreamReader; import java.util.Scanner; class Main { public static void main (String[] args) throws IOException { Scanner sc = new Scanner(System.in); int weeks = sc.nextInt(); int debt = (int) Math.round(100000 * (1 + 0.05 * weeks) / 10000) * 10000; 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
public class Main{ public static void main(String[] args) { // ?????? int week = Integer.parseInt(args[0]); // ????????? int debt = 100000; // ?????? double rate = 1.05; // ???????????? int repayment; // ?????????????????? int roundUp = 1000; // 1,000 ????????????????????????????¨???????????????????????????????????????????????????§????????? int reparment_k = debt / roundUp; for (int i = 0; i < week; i++) { reparment_k = (int) (Math.ceil(reparment_k * rate)); } repayment = reparment_k * 1000; System.out.println(repayment); return; } }
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; long int debt = 100000; scanf("%d", &n); 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
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; int ans = 1000000; cin >> n; for (int i = 0; i < n; i++) { ans *= 1.05; if ((ans % 1000) != 0) ans = ans - ans % 1000 + 1000; } 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 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<stdio.h> #include<stdlib.h> #define RISI 1.05 int main(void) { unsigned double debt = 100000; int i = 0; int n = 0; unsigned double kiriage = 0; int ans=0; scanf("%d",&n); for(i = 0; i < n; i++) { debt = debt * RISI; printf("%lf\n",debt); } kiriage = (int)debt / 10000; kiriage = kiriage*10000; ans = kiriage+10000; printf("%d\n",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
object Main extends App { val sc = new java.util.Scanner(System.in) val n = sc.nextInt var num: BigInt = 100000 for(i <- 0 until n) { num += num / 20 if(num%10!=0) { num = num / 10 num = num * 10 + 10 } if(num%100!=0) { num = num / 100 num = num * 100 + 100 } if(num%1000!=1000) { num = num / 1000 num = num * 1000 + 1000 } } println(num) }
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
from math import ceil n = int(input()) x = 100 for i in range(n): x = ceil(x * 1.05) print(x * 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
UNKNOWN
#include <bits/stdc++.h> int main(void) { int week; int returnMoney; int i; double ratio; ratio = 1.05; returnMoney = 100000; scanf("%d", &week); for (i = 1; i < week; i++) { ratio *= 1.05; } returnMoney *= ratio; if (returnMoney % 1000 > 0) { returnMoney = returnMoney / 10000 * 10000 + 10000; } printf("%d\n", returnMoney); 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; import java.math.BigDecimal; import java.math.RoundingMode; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int w=sc.nextInt(); int a=100000; for(int i=0;i<w;i++){ a+=a/20; BigDecimal x=new BigDecimal(a); x=x.setScale(-3,RoundingMode.CEILING); } System.out.println(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 <stdio.h> #include <math.h> int main(void) { int n; double y; scanf("%f",&n); printf(pow(100000??? y)); } 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> #include <math.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; double money; float interest_rate; debt = 100000; interest_rate = 1.05; cin >> n; debt = interest(debt, interest_rate, n); money = (double) debt / 1000;// 1000?????\???????°???°?????\?????? money = ceil(money) * 1000;// ?°???°?????\????????????????????????????????? debt = money; 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(void) { int debt = 1000; int n; scanf("%d", &n); for (int i = 0; i < n; i++) { debt *= 1.05; if (debt % 10) { debt += (10 - (debt % 10)); } } printf("%d000", 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 m = 1000, i, w; scanf("%d", &w); for (i = 0; i < w; i++) { m *= 1.05; if ((w % 10) != 0) { w / 10; w++; w *= 10; } } w *= 100; printf("%d", w); 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
p=100000;main(a){for(scanf("%d",&a);a--;p=(p/1000+!!(p%1000))*1000)p+=p/20;printf("%d\n",p);p-=p;}
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 = 100000; cin >> n; for (int i = 0; i < n; i++) { money += (money * 0.05); } money = ((int)money / 10000) * 10000 + 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 i, n; double r = 0, m = 100000; scanf("%d", &n); for (i = 0; i != n; i++) { m += m * 0.05; r = floor(m * 0.001) * 1000; if (m != r) { m = r; m += 1000; } } (int)m; printf("%.0f", 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
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 = money + (money * 0.05); if(money - (money/1000).to!int() * 1000 != 0){ money = ((money/1000 + 1).to!int())*1000; } } break; } } writeln(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) { double m; int n; long t; m = 100000; scanf("%ld", &n); for (; n > 0; n--) { m = m * 1.05; t = m; if (t % 1000 != 0) m = m - t % 1000 + 1000; } printf("%ld\n", 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
cpp
#include <bits/stdc++.h> using namespace std; int main() { int a = 100000, b = 0, t = 0; cin >> t; for (int k = 1; k <= t; k++) { b = a * 1.05; b = (b + 900) / 1000 * 1000; a = b; } cout << a << 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) { double debt = 100000; int i = 0; int n = 0; double kiriage = 0; int ans = 0; scanf("%d", &n); for (i = 0; i < n; i++) { debt = debt * 1.05; printf("%lf\n", debt); } kiriage = (int)debt / 10000; kiriage = kiriage * 10000; ans = kiriage + 10000; printf("%d\n", 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, debt = 99999; for (scanf("%d", &n); n--; debt = ((int)(debt * 1.05) / 1000 + 1) * 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
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", 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
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; long double cath = 100000; cin >> n; for (int i = 1; i <= n; i++) { cath += cath * 0.05; cath = ceil(cath * 0.001); cath *= 1000; } cout << cath << 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 / 1000) * 1000; 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.*; import java.util.*; public class Main { public static void main(String[] args) throws java.io.IOException{ Scanner scan = new Scanner(System.in); int sum=100000; for(int n=scan.nextInt();n>0;n--){ sum *=1.05; int m= up3(sum); sum+=(10-m)*100; } System.out.println(sum); } public static int up3(int n){ return ((((n%1000)%10)%10)%10); } }
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 debt = 100 for i in range(int(input())): ceil = math.ceil(debt*1.05) print(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
UNKNOWN
#include <bits/stdc++.h> void reverse(char str[]) { int i, j, x; char revstr[1000]; i = 0; while (str[i] != '\0') { i++; } x = i; j = 0; for (i = i - 1; i >= 0; i--, j++) { revstr[j] = str[i]; } revstr[j] = '\0'; int n; for (n = 0; n < x; n++) { str[n] = revstr[n]; } } int main() { char str[1000]; scanf("%999s", str); reverse(str); printf("%s\n", str); 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.math.BigDecimal; import java.util.Scanner; public class Chika { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int week = scanner.nextInt(); BigDecimal debt = new BigDecimal(100000); BigDecimal rate = new BigDecimal(1.05); for (int i = 0; i < week; i++) { debt = debt.multiply(rate); BigDecimal amari = debt.remainder(new BigDecimal(1000)); if(amari !=new BigDecimal(0)){ debt = debt.add(new BigDecimal(1000)).subtract(amari); } } System.out.println(debt); scanner.close(); } }
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 = ceil(x * 1.05); } printf("%d", 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
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n; double x; double y; scanf("%f", &n); x = ceil(100 * pow(1.05, y)); x = x * 1000; printf("%f", 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
cpp
#include <bits/stdc++.h> using namespace std; int main() { int a; double kane = 10; cin >> a; for (int i = 0; i < a; i++) { kane = kane * 1.05; } kane = ceil(kane); printf("%d0000\n", (int)kane); 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; std::cin >> n; double result = 100; for (int i = n; i; i--) { result *= 1.05; result = (int)(result + 0.9); } result *= 1000; std::cout << (int)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
cpp
#include <bits/stdc++.h> using namespace std; int main() { int week; cin >> week; double money = 100; for (int i = 0; i < week; i++) { money = money * 1.05; money += 0.9; money = int(money); } printf("%d\n", int(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.*; import java.util.*; public class Main { public static void main(String[] args) throws java.io.IOException{ Scanner scan = new Scanner(System.in); int sum=100000; for(int n=scan.nextInt();n>0;n--){ sum +=5000; } System.out.println(sum); } public static int up3(int n){ return ((n/100)%10); } }
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)); double sum = 100000; //????????????10?????? int ??? = 0; //?????????????????±??? ??? = Integer.parseInt(br.readLine()); for(int i = 0; i < ???; i++){ sum = sum * 1.05; sum = sum / 1000; sum = Math.ceil(sum) * 1000; } System.out.println(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
java
import java.io.*; 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 result = 10; for(int i=0; i<n; i++){ result *= 1.05; } int result1 = (int)Math.ceil(result)*10000; System.out.println(result1); } }
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 = 100; 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
debt = 100000 for i in 1..gets.to_i debt = (debt*1.05/1000.0).ceil*1000.0 end puts 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, x, n; x = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { x *= 1.05; if (x % 1000 != 0) x += (1000 - x % 1000); } printf("%d", 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.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.Scanner; import java.util.StringTokenizer; public class Main { static InputReader in; static PrintWriter out; static class Solution { void solve() throws IOException { int n = in.nextInt(); int debt = 100000; for (int i = 0; i < n; i++) { debt *= 105; debt = debt / 100 / 1000; if (debt % 10 != 0) { debt = debt * 1000 + 1000; } } out.println(debt); // End solve() } // End Solution } public static void main(String[] args) throws IOException { in = new InputReader(System.in); out = new PrintWriter(System.out); Solution solver = new Solution(); solver.solve(); out.close(); } static class InputReader { public BufferedReader br; public StringTokenizer st; public InputReader(InputStream stream) { br = new BufferedReader(new InputStreamReader(stream)); } public int nextInt() throws IOException { while (st == null || !st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } return Integer.parseInt(st.nextToken()); } public long nextLong() throws IOException { while (st == null || !st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } return Long.parseLong(st.nextToken()); } public String next() throws IOException { while (st == null || !st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } return st.nextToken(); } public double nextDouble() throws IOException { while (st == null || !st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } return Double.parseDouble(st.nextToken()); } } }