Search is not available for this dataset
name
stringlengths
2
88
description
stringlengths
31
8.62k
public_tests
dict
private_tests
dict
solution_type
stringclasses
2 values
programming_language
stringclasses
5 values
solution
stringlengths
1
983k
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int n, i, kari, ri; kari = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { ri = kari * 5; ri = ri / 100; kari = kari + ri; } printf("%d", kari); 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
while True: try: n = int(raw_input()) l = int(100000*pow(1.05, n)) if l%10000 > 5000: l -= l%10000 l += 10000 else: l -= l%10000 print l except EOFError: break
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a 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; } //money = money % 1000 == 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
java
import java.util.Scanner; public class DeptHell { // ????????????10?????? public static int LOAN = 100000; public static void main(String[] args) { // ??????????????? @SuppressWarnings("resource") Scanner sc = new Scanner(System.in); int input = sc.nextInt(); double result = LOAN; // ?????±??????????¨???? for (int i = 0; input > i; i++) { // ?????????????????? result = result * 1.05; // ????????\????????????????????? // ????????\???????°???°????????? result = result / 1000; // ?°???°??????????????? result = Math.ceil(result); // ????????????????????? result = result * 1000; } System.out.print((int) result); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
import std.stdio; import std.conv; import std.algorithm; import std.string; import std.file; import std.math; int main() { string l; l = readln().split[0]; int c = to!int(l); // iteration int d = 100000; // debt for(int i=0; i<c; i++){ d *= 1.05; if(d > d / 1000 * 1000) d += 1000; d = d / 1000 * 1000; } printf("%d", 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
UNKNOWN
<?php $sum=100000; while($line=trim(fgets(STDIN))){ echo ceil(pow(1.05,$line)*$sum/10000)*10000; echo "\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 n; int deb = 100000; scanf("%d", &n); for (; n > 0; n--) { deb += deb * 0.05; deb = (deb - 1) - (deb - 1) % 1000 + 1000; } printf("%d\n", deb); return 1; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a 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
r=lambda x:(x*2+1)//2 n = int(input()) ans = 100000 + (100000 * (0.05 * n)) print(int(r(ans / 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
java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int week = sc.nextInt(); double debt = 100000; for(int i = 0 ; i < week ; i++){ debt = debt * 1.05; double a = debt/1000; a = Math.ceil(a); debt = a * 1000; } System.out.printf("%.0f",debt); sc.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; int d = 100000; int tmp; scanf("%d", &n); while (n > 0) { d *= 1.05; tmp = d % 1000; if (tmp != 0) { d += 1000; d -= tmp; } } printf("%d\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
java
import java.util.Scanner; public class Main { public static void main(String args[]) { double debt = 100000.0; for(int i = 0; i< new Scanner(System.in).nextInt(); i++) { debt = Math.ceil(debt * 0.00105) * 1000.0; } System.out.println(debt); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int ans = 100000; for(int i=0;i<n;i++){ ans *= 1.05; } int r = ans % 10000; ans = ans / 10000 * 10000; if(r > 0){ ans += 10000; } System.out.println(ans); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
python3
import sys import math n = int(input()) debt = 100000 for i in range(1,n+1): debt = math.floor((debt*1.05)/1000)*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
python3
import math def int_ceil(src,range): return int(math.ceil(src/float(range)) * range) def main(): week = int(input()) debt = 100000 for i in range(week): risi = debt * 0.05 debt = int_ceil(debt+ risi,1000) print(math) if __name__ == "__main__": main()
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <stdio.h> int main(void){ int loan=100000; double temp=0.0; int week; int check=0; scanf("%d", &week); while(week > 0){ temp=loan*1.05; loan=(int)temp; check = temp % 1000.0; if(check!=0){ temp/=1000; temp*=1000; temp+=1000; loan=temp; week--; continue; } check = temp % 100.0; if(check!=0){ temp/=100; temp*=100; temp+=100; loan=temp; week--; continue; } check = temp % 10.0; if(check!=0){ temp/=10; temp*=10; temp+=10; loan=temp; week--; continue; } if( (temp-loan) != 0){ loan+=1; } week--; } printf("%d\n",loan); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int sum = 100000; //100,000yen for(int i=0; i<n; i++){ sum += Main.DeptMaker(sum); } System.out.println(sum); } private static int DeptMaker(int sum){ int dept = (int) Math.round((sum * 0.05)/1000)*1000; return dept; } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a 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() { double d=100000.0 int n,i; scanf("%d",&n); for(i=0;i<n;i++){ d*=1.05; } if((int)d%10000!=0){ d = (int)d - (int)d%10000 +10000; } printf("%d\n",(int)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
UNKNOWN
#include <bits/stdc++.h> int main() { int week; int i; int res = 100000; int l; scanf("%d", &week); for (i = 0; i < week; i++) { res += 100000 * 0.05; } l = res % 10000; res -= l; l /= 1000; if (l >= 5) res += 10000; printf("%d\n", res); 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, i, kane = 100000; cin >> n; for (i = 0; i < n; i++) { kane = kane * 1.05; } cout << kane << " "; kane = kane - kane % 1000; kane = kane + 1000; cout << kane << 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
#Write the program you'd like to run below. import math week = int(input()) debt = int(100000) for i in range(week): debt = debt * 1.05 debt = math.ceil(debt/10000) debt = int(debt * 10000) 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
python2
# -*- coding: utf-8 -*- import sys from math import ceil for line in ["5"]:#sys.stdin.readlines(): List = map(int, line.strip().split()) n = List[0] yen = 100000 for i in xrange(n): yen *= 1.05 yen = int(ceil(yen/1000)) * 1000 print yen
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { double i, n, answer, v; int r; while (scanf("%lf", &n) == 1) { answer = 100000; for (i = 0; i < n; ++i) { answer += 100000 * 0.05; } v = answer / 10000; answer = floor(v); if (v - answer >= 0.1) { ++answer; } r = answer * 10000; printf("%d", r); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { double i = 100000; int n; cin >> n; for (int(i) = 0; (i) < (int)(n); (i)++) { i = ((double)((long long)(i * 1.05))); } cout << (long long)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
cpp
#include <bits/stdc++.h> using namespace std; int main(void) { int a; float b = 100000.0f; std::cin >> a; if (a == 0) std::cout << b << std::endl; else if (a <= 100 && a >= 0) { for (int i = 0; i < a; i++) { b *= 1.05f; b /= 1000; double c = ceil(b); b = c * 1000; } std::cout << b << std::endl; } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n, i, maney = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { maney += maney * 0.05; maney = ((maney + 900) / 1000); maney = maney * 1000; } printf("%d\n", maney); scanf("%d", &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
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; 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
python2
import math price = 100000.0 n = int(raw_input()) for i in range(n): price = math.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
UNKNOWN
package main import "fmt" var ( dept float64 = 100000 addDept float64 = dept * 0.05 ) func main() { var week int var nWeekDept float64 fmt.Scan(&week) nWeekDept = dept + (addDept * float64(week)) if int(nWeekDept)%1000 != 0 { nWeekDept += addDept } fmt.Println(nWeekDept) }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a 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; long long money = 100000; for (int i = 0; i < n; i++) money = (1.05 * money); if (money % 10000 != 0) { money = money / 10000; money++; 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
cpp
#include <bits/stdc++.h> using namespace std; int main() { double money = 100000; int n; cin >> n; for (int i = 0; i < n; i++) { money = (double)money * 1.05; int up = money / 1000; if ((int)(money - up) > 0) money = (up + 1) * 1000; else money = up * 1000; } int m = (int)money; cout << m << 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() { double n, add, money = 100000; while (cin >> n) { add = 0; money = 100000; for (int i = 0; i < n; i++) { add = money * 0.05; money += add; } int ans = money, t; cout << ans << endl; t = ans / 1000; ans /= 10000; ans *= 10000; if (t % 10 != 0) { ans += 10000; } cout << ans << endl; } return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <iostream> int main(){ int n,debt=100000; std::cin>>n; for(int i=0;i<n;i++){ debt*=1.05; debt=debt%1000 ? debt/1000*1000+1000 : debt } std::cout<<debt<<'\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
java
/** * @author Yuki */ public class Main{ /*** ??????????????? */ private static double revaluation = 1000; /*** ?????? */ private static double rate = 1.05; /*** ?????? */ private static double dept = 100000; /*** ??± */ private static int week; /** * ?????????????????????<br> * ?????????????????????????????? * * @param args * ??????????????° */ public static void main(String[] args) { // ????????? week = Integer.parseInt(args[0]); // ???????????????????????? System.out.println(getTotalDept()); } /** * ?????????????????????????????? ????????????????????±???????¨??????????????¨???????????????? * * @return ??????????????? */ private static int getTotalDept() { dept = dept / revaluation; for (int i = 0; i < week; i++) { dept = Math.ceil(dept * rate); // ???????????? } return (int) (dept * revaluation); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a 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; int ans = 1000; for (int i = 0; i < n; i++) ans *= 1.05; cout << ans << endl; return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
using System; using System.Collections.Generic; using System.Collections; using System.Linq; using System.IO; public class Sample8{ public static void Main(){ int week = int.Parse(Console.ReadLine ()); double result = debutResult (week); Console.WriteLine (result); } public static double debutResult (int week){ double debut = 100000; for (int i = 0; i < week; i++){ debut = debut * 1.05; } debut *= 0.001; // debut = Math.Ceiling (debut); // debut *= 1000; return debut; } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a 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 n=int(input()) s=100000 for i in range(n): s +=(s*0.05) s=s/10000 s=int(math.ceil(s)*10) print(str(s)+"000")
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a 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) { System.out.println((int)Math.ceil(Math.pow(1.05, (new Scanner(System.in)).nextInt()) * 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 main() { int m = 100000; int d, w; cin >> d; w = d / 7; for (int i = 0; i < w; i++) { m *= 1.05; m += 999; m /= 1000; m *= 1000; } cout << m << '\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 i, n, sum = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { sum = sum + (double)(sum * 5) / 100; if (sum % 1000 != 0) { sum += 1000; } sum = sum / 1000 * 1000; } 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
java
import java.util.Scanner; public class Main { public static void main(String args[]) { double debt = 100000.0; int nWeeks = new Scanner(System.in).nextInt(); for(int i = 0; i < nWeeks; i++) { debt = ((int)(debt * 0.00105 + 0.9)) * 1000.0; } 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; int cost = 100000; bool check = false; cin >> n; for (int i = 0; i < n; i++) { cost *= 1.05; if (cost % 1000 > 0) check = true; else check = false; cost /= 1000; cost *= 1000; if (check) { cost += 1000; } cout << cost << endl; } cout << cost << 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(void){ int i,n; int x = 100000; scanf("%d"&n); for(i=0;i<n;i++){ x=x*1.05; if(x%1000!=0){ x=(x/1000+1)*1000; } } printf("%d\n",%x); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(int argc, const char* argv[]) { int n, i, money = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { money = money * 1.05; } if (money % 1000 != 0) money = ceil(money / 10000 + 1) * 10000 + 0; 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() { int n; double ans = 100000; cin >> n; for (int i = 0; i < n; i++) { ans = ans + ans * 0.05; ans += 900; ans = (int)ans / 1000; ans = ans * 1000; } cout << (int)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
UNKNOWN
#include<stdio.h> #include<stdlib.h> #include<math.h> int main(){ double i,n,answer,v; int r; while(scanf("%lf",&n)==1){ answer=100000; for(i=0;i<n;++i){ answer+=100000*0.05; } v= answer/10000; answer=floor(v); if(v-answer>=0.1){ ++answer; } r=answer*10000; printf("%d",r); } exit 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, s = 100000, a, b, i; scanf("%d", &n); for (i = 0; i < n; i++) { s = s * 1.05; a = s % 1000; b = s / 1000; if (a != 0) { b = b + 1; } s = b * 1000; } printf("%d", s); 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, s = 100000; cin >> n; n++; while (n--) { s += 5000; } cout << s << 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() { double debt; int n; debt = 100000; cin >> n; for (int i = 0; i < n; i++) { debt *= 1.05; debt /= 1000; debt += 0.999; debt = floor(debt); debt *= 1000; } cout << debt << 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 round(double n); int main(void) { double debt; int debt2; double rishi; int n; int i; debt = 100000; rishi = 1.05; scanf("%d", &n); for (i = 0; i < n; i++) { debt = debt * rishi; } debt2 = round(debt / 10000); debt2 *= 10000; printf("%d\n", debt2); return 0; } int round(double n) { int N; n += 0.5; N = (int)n; return 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> 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 = (pow(10, i)); *money += add; } } } int main(void) { int money = 100000; int week; int interest; scanf("%d", &week); interest = 5000 * week; money += interest; 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
using System; public class DebtHell { public static void Main(string[] args) { int week = int.Parse(Console.ReadLine()); double cache = 100000; for (int i = 0; i < week; i++) { cache *= 1.05; } cache += 9000; uint u = (uint)cache; string temp = u.ToString(); Console.WriteLine(temp.Substring(0, temp.Length - 4) + "0000"); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int n, i, money = 100000, a; scanf("%d", &n); for (i = 0; i < n; i++) { money = money * 1.05; money = money + 500; a = money % 1000; } money = money - a; 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
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.05); debt = debt - (debt % 1000) + 1000; } Console.Write(debt); } } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.math.BigDecimal; import java.util.Scanner; public class test1 { public static final int DEPT = 100000; public static final BigDecimal INTEREST = new BigDecimal(0.05); public static void main(String[] args) { Scanner s = new Scanner(System.in); int week = Integer.parseInt(s.next()); BigDecimal repay = new BigDecimal(DEPT); for (int i = 1; i < week; ++i) { repay = repay.add(repay.multiply(INTEREST)); } s.close(); System.out.println(repay.setScale(-4, BigDecimal.ROUND_CEILING) .toPlainString()); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a 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
#!/usr/bin/python # -*- coding: utf-8 -*- num = int(raw_input()) result = 100 for i in range(num): result *= 1.05 print int(round(result))*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 i, n; float debt = 100000, interest = 0.05; n = 5; for (i = 0; i < n; i++) { debt += debt * interest; debt /= 1000; debt = ceil(debt) * 1000; } printf("%d\n", (int)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 a, i; float yen = 100000; scanf("%d", &a); for (i = 0; i < a; i++) { yen *= 1.05f; } yen = 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
cpp
#include <bits/stdc++.h> using namespace std; int main(void) { int n; long long money = 100000; int keta = 1; int judge = 1; double temp; cin >> n; for (int i = (1); i < (n + 1); i++) { money += 0.05 * money; temp = money; while (judge) { temp = (int)temp / 10; if (temp) { keta++; } else judge = 0; } for (int i = 0; i < (int)3; i++) money = money / 10; money = ceil(money); for (int i = 0; i < (int)3; i++) money = money * 10; keta = 0; judge = 1; } 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> int main() { int n; scanf("%d", &n); int t = 100000; for (int i = 1; i <= n; i++) { int in = t * 0.05; if (in % 1000) in = (in / 1000 + 1) * 1000; t += in; } printf("%d", t); 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() { char inp[96]; int n; int i, len; int sum; int wk, hasu; int wk2; gets(inp); len = strlen(inp); if (len == 0) { return 1; } sscanf(inp, "%d", &n); sum = (100000); for (i = 0; i < n; i++) { wk = (int)((double)sum * (double)(0.05)); wk /= 100; wk2 = (wk / 10); hasu = wk - wk2 * 10; if (hasu > 0) { wk += 10; } wk /= 10; wk *= 1000; sum += wk; } 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
java
import java.util.Scanner; class Procon{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int n = 100000; while(scan.hasNext()){ int x = scan.nextInt(); int m = n; int s = n; for(int i = 0;i < x;i++){ m = m + (int)(n*0.05); s = s + (int)(s*0.05); } int t = m % 10000; int t2 = s % 10000; if(t != 0){ m = m - t + 10000; } if(t2 != 0){ s = s - t2 +10000; } System.out.println(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
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n, i, m = 100000; scanf("%d", &n); for (i = 1; i <= n; i++) { m = m * 1.05; if (m % 1000) m = (m / 1000 + 1) * 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
cpp
#include <bits/stdc++.h> const int first = 100000; int get_dept(int n) { int dept = first; for (int i = 0; i < n; i++) { dept *= 1.05; } return dept; } int round_up(int price) { if (price <= 10000) { return price; } int complement = 10000 - price % 10000; return (price + complement); } int main() { int n; std::cin >> n; std::cout << (round_up(get_dept(n))) << std::endl; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
using System; using System.Collections.Generic; using System.Linq; class Program { static int Main(string[] args) { int n = int.Parse(Console.ReadLine()); double v = 100000; for (int i = 0; i < n; i++) { v += v * 0.05; } Console.WriteLine("{0}", Math.Ceiling(v / 10000.0f) * 10000.0f); return 0; } static decimal GetMinBaisu(List<decimal> a, List<decimal> b) { decimal v = 1; for (int i = 0; i < a.Count; i++) { v *= a[i]; } for (int i = 0; i < b.Count; i++) { v *= b[i]; } return v; } static decimal GetMaxYakusu(List<decimal> a, List<decimal> b) { decimal v = 1; for (int i = 0; i < a.Count; i++) { if (b.Contains(a[i]) == true) { v *= a[i]; b.Remove(a[i]); } } return v; } static List<decimal> GetYakusu(decimal v) { List<decimal> list = new List<decimal>(); decimal c = 2; while (true) { if (v < 2) { break; } if (v % c == 0) { list.Add(c); v = v / c; } else { c++; } } return list; } static int InputN() { string v = Console.ReadLine(); return int.Parse(v); } static int[] InputInt() { string v = Console.ReadLine(); string[] vs = v.Split(' '); return new int[] { int.Parse(vs[0]), int.Parse(vs[1]) }; } static void Check(int n, List<int[]> list) { SortedDictionary<int, int> v = new SortedDictionary<int, int>(); int maxValue = 0; for (int i = 0; i < list.Count; i++) { int id = list[i][0]; if (v.ContainsKey(id) == false) { v.Add(id, 0); } v[id] += list[i][1]; if (maxValue < v[id]) { maxValue = v[id]; Console.WriteLine("{0} {1}", id, maxValue); } else { maxValue = v.Values.Max(); var q = v.Where((x) => x.Value == maxValue); foreach (var item in q) { Console.WriteLine("{0} {1}", item.Key, maxValue); break; } } } } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int n, i, kurai; double price = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { price = price * 1.05; } price = price / 1000; kurai = (int)price % 10; price = price / 10; if (kurai >= 5) { price = (int)price + 1; } price = price * 10000; printf("%.0f", price); }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a 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, x = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { x = x + 100000 * 0.05; } x = x / 10000; x++; 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
java
import java.io.*; class Main{ public static void main(String[] args)throws IOException{ BufferedReader br= new BufferedReader(new InputStreamReader(System.in)); String buf; buf=br.readLine(); int n=Integer.parseInt(buf); int money=100000; double money2=money; for(int i=0;i<=n;i++){ money=money+(int)(money2*0.05); money/=1000; money*=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<stdio.h> #include<stdlib.h> #include<iostream> #include<string> #include<vector> #include<math.h> #include<queue> #include <algorithm> #include<functional> #include<cstdlib> #include<cmath> #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i >= 0;i--) #define FOR(i, m, n) for(int i = m;i < n;i++) #define FORR(i, m, n) for(int i = m;i >= n;i--) #define CI cin >> #define CO cout << #define E << endl; using namespace std; typedef pair<int, int> P; typedef pair<long, long> LP; typedef pair<int, P> PP; typedef pair<long, LP> LPP; int dy[] = { 0, 0, 1, -1, 0 }; int dx[] = { 1, -1, 0, 0, 0 }; int A = 0, B = 0, K = 0, T = 0, W = 0, N = 0, H = 0; int n = 0; double L = 0; double S = 0; double ar = 0, br = 0, cr = 0; int answer = 0; string C; string sA, strB; vector<vector<char>> map; vector<double> num; vector<string> str; int sum = 0; vector<int> value; vector<int> weight; int dp[110][10010]; int data_[210][2] = { -2 }; void input(void) { CI n; return; } int main(void) { input(); long long double money = 100000; for (int i = 0; i < n; i++) { money *= 1.05; if ((int)money % 1000 > 0) { money = money - ((int)(money) % 1000) + 1000 - (money - (double)(int)money); } } CO money E 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
import math N = int(input()) A = 100000 for _ in range(N): A = A * 1.05 A = (int(math.ceil(A / 10000))) * 10000 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
UNKNOWN
#include <stdio.h> int main(void){ int loan=100000; double temp=0.0; int week; int check=0; scanf("%d", &week); while(week > 0){ temp=loan*1.05; loan=(int)temp; check = loan % 1000; if(check!=0){ loan/=1000; loan*=1000; loan+=1000; week--; continue; } check = loan % 100.0; if(check!=0){ loan/=100; loan*=100; loan+=100; week--; continue; } check = loan % 10.0; if(check!=0){ loan/=10; loan*=10; loan+=10; week--; continue; } if( (temp-loan) != 0){ loan+=1; } week--; } printf("%d\n",loan); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n, k = 100000; scanf("%d", &n); while (n > 0) { n--; k *= 1.05; k = (k / 1000 + 1) * 1000; } 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
UNKNOWN
include<stdio.h> int main(){ int a,y,n,money=10000; scanf("%d",&n); for(a=0;a<n;a++){ money=money+money/100*5; } y=money%1000; money=money/1000; if(y>=500){ money=money+1; } money=money*10000; printf("%d\n",money); return (0); }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
import java.util.*;class Main{public static void main(String[]a){System.out.println(f(new Scanner(System.in).nextInt())*1000);}static int f(int n){return n<1?100:(int)Math.ceil(f(n-1)*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
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { static int debt = 100000; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = ""; while ((line = br.readLine()) != null && !line.isEmpty()) { int w = Integer.parseInt(line); for (int i = 0; i < w; i++) { debt *= 1.05; debt = debt - (debt % 1000) + 1000; } System.out.println(debt); } } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a line. Output Print the amout of the debt in a line. Example Input 5 Output 130000
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n, i, result; float debt, inter; scanf("%d", &n); debt = 100000; for (i = 0; i < 5; i++) { inter = debt * 0.05; debt *= debt + inter; } 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
UNKNOWN
using System; using System.Collections.Generic; using System.Collections; using System.Linq; using System.IO; public class Sample8{ public static void Main(){ int week = int.Parse(Console.ReadLine ()); double result = debutResult (week); Console.WriteLine ((int)result); } public static double debutResult (int week){ double debut = 100000; double result = 0; for (int i = 0; i < week; i++){ result = debut + (debut * 0.05); debut += debut * 0.05; } result *= 0.0001; result = Math.Ceiling (result); result *= 10000; 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 money = 100000; int n; cin >> n; while (n--) { money *= 1.05; } if (money % 10000 != 0) { money -= (money % 10000); 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
cpp
#include <bits/stdc++.h> using namespace std; int main() { double money = 100000; int n; cin >> n; for (int i = 1; i <= n; i++) { money *= 1.05; double miman = money - ((int)(money * 0.001)) * 1000.0; if (miman > 0) { money = money - miman + 1000.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
java
import java.util.*; import java.lang.*; import java.math.*; public class Main { Scanner sc = new Scanner(System.in); void run(){ int x = sc.nextInt(); int debt = 100000; for(int i = 0; i < x; i++){ debt *= 105; System.out.println("*"+debt); debt += 99999; debt /= 100000; System.out.println("/"+debt); debt *= 1000; } System.out.println(debt); } public static void main(String[] args){ Main m = new Main(); m.run(); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a 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
int main(void){ int n; int i; int debt = 100000; scanf("%d",&n); for(i = 0;i < n;i++){ debt *= 1.05; if(debt%1000 > 0){ debt -= debt%1000; debt += 1000; } } 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
UNKNOWN
#include <bits/stdc++.h> int main() { int n, i; double x = 100000; int y; scanf("%d", &n); for (i = 0; i < n; i++) { x = x * 1.05; x = x / 1000; x = ceil(x); y = x; y = y * 1000; x = y; } printf("%d", 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 <bits/stdc++.h> int main(void) { int n; std::cin >> n; std::cout << round(100000 * pow(1.05, n) + 999) << 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 <bits/stdc++.h> int main(void) { int i, n, mod; long debt = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { debt *= 1.05; mod = debt % 1000; debt += (mod ? (1000 - mod) : 0); } printf("%ld", 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() { 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("%.15000lf\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
var debt = 100; var wk = parseInt(require('fs').readFileSync('/dev/stdin', 'utf8')); for(; wk--;){ debt = ~~(debt * 1.05); } console.log(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
n = gets.chomp.to_i dt = 100000 n.times do dt = dt * 1.05 if money % 1000 > 0 dt = dt.ceil(-3) end end puts dt
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a 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, j; 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; } printf("%lf\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.*; class Main { public static void main(String[] args) { try { BufferedReader br = new BufferedReader(new InputStreamReader(System.in));// ??\???????????????????????? String line = br.readLine(); int deptWeek = Integer.parseInt(line); int dept = 100000; for(int i = 0; i < deptWeek; i++ ){ int checkDept = (int)Math.ceil(dept * 0.05); String strCheckDept = String.valueOf(checkDept); String num = strCheckDept.substring(strCheckDept.length() - 4, strCheckDept.length() - 3); if(!num.equals("0")){ int numnum = Integer.parseInt(num); checkDept = checkDept + 10000 - numnum; } dept = dept + checkDept; } System.out.println(dept); } catch (Exception e) { e.printStackTrace(); } } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a 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) { int deptWeek = 0; if (args.length != 0) { // コマンドライン引数から整数nを取り出す deptWeek = Integer.parseInt(args[0]); } // 変数宣言 double dept = 100000; // 借金 int ceilLength = 1000; // 切り上げ時の数値 // n週分、借金に5%の利子を加算(1000円未満は切り上げとする) for (int i = 0; i < deptWeek; i++) { dept *= 1.05; dept = Math.ceil(dept / ceilLength) * ceilLength; } // 借金の残高を出力 System.out.println(String.valueOf((int)dept)); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a 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 r = 100000*(1.05**int(input())) print(math.ceil(r/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
i = int(input()) x = 100000 for _ in range(i): x = x + x * 0.05 x = int(round(x, -4)) print(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
python3
from math import ceil n=int(input()) print((int(ceil(10*(1.05)**n))*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
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
java
import java.lang.Math; /** * @author Yuki */ public class Main { /*** ??????????????? */ private static double revaluation = 1000; /*** ?????? */ private static double rate = 1.05; /*** ?????? */ private static double dept = 100000; /*** ??± */ private static int week; /** * ?????????????????????<br> * ?????????????????????????????? * * @param args * ??????????????° */ public static void main(String[] args) { // ????????? week = Integer.parseInt(args[0]); // ???????????????????????? System.out.println(getTotalDept()); } /** * ?????????????????????????????? ????????????????????±???????¨??????????????¨???????????????? * * @return ??????????????? */ private static int getTotalDept() { dept = dept / revaluation; for (int i = 0; i < week; i++) { dept = Math.ceil(dept * rate); // ???????????? } return (int) (dept * revaluation); } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is given in a 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; using System.Collections.Generic; using System.Collections; using System.Linq; using System.IO; public class Sample8{ public static void Main(){ int week = int.Parse(Console.ReadLine ()); double result = debutResult (week); Console.WriteLine (result); } public static double debutResult (int week){ double debut = 100000; double result = 0; for (int i = 0; i < week; i++){ result = debut + (debut * 0.05); debut += debut * 0.05; } result *= 0.0001; result = Math.Ceiling (result); 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
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n, i; int many; scanf("%d", &n); many = 100000 + (n * 0.05 * 100000); if (many % 10000 != 0) { many = many - (many % 10000) + 10000; } printf("%d\n", many); 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 solve() { int N; cin >> N; double sum = 100000; for (int i = 0; i < N; ++i) { sum *= 1.05; double temp = (int)sum % 1000; if (temp) { sum += 1000 - temp; } } cout << sum << endl; } int main() { solve(); 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 = 1.05, n; cin >> n; double debt = 100000 * pow(a, n); int i = (int)debt / 10000 * 10000 + 10000; cout << i << 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 = require("fs").readFileSync("/dev/stdin","utf8"); var debt = 100000; var interest = 5; calculateDebt(debt, weeks, interest); function calculateDebt(debt, interest, weeks){ for (i = 0; i < 5; i++) { debt = debt * 1.05; debt = Math.ceil(debt/1000)*1000; } console.log(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; long long convert(long long money) { double temp = money; temp /= 1000; if (temp > 0) money += 1000; money -= money % 1000; return (money); } int main(void) { int n; cin >> n; long long now = 100000; long long plus = now * 0.05; for (int r = 0; r < n; r++) { now += plus; now = convert(now); } cout << now << endl; return (0); }