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": []
} | CORRECT | cpp | #include <cstdio>
#include <cmath>
using namespace std;
int main() {
int n, a = 100000;
scanf("%d", &n);
while (n--) {
a += a * 5 / 100;
a = (int)ceil(a / 1000.0) * 1000;
}
printf("%d\n", 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": []
} | CORRECT | java | import java.util.*;
public class Main {
public static void main(String[] args) {
//input
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int sum = 100000;
for(int i=0;i<N;i++){
sum *= 1.05;
if(sum%1000 != 0){sum += 1000 - sum % 1000;}
}
//output
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": []
} | CORRECT | cpp | #include<stdio.h>
int main(void)
{
int n,i,j,x;
scanf("%d",&n);
i=100000;
for(j=0;j<n;j++){
i=i*5/100+i;
x=i%1000;
if(x!=0){
x=1000-x;
i=i+x;
}
}
printf("%d\n",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": []
} | CORRECT | python3 | n=int(input())
z=100000
for i in range(n):
z*=1.05
if z%1000!=0:
z-=z%1000
z+=1000
print(int(z))
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | CORRECT | cpp | #include<stdio.h>
int main(){
int C = 100000,n;
scanf("%d",&n);
for(int i = 0;i < n;i++){
C = (C*21)/20;
if(C%1000 > 0)
C += 1000-C%1000;
}
printf("%d\n",C);
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": []
} | CORRECT | cpp | #include<iostream>
int main(){int n,s=100000,i;std::cin>>n;for(i=0;i<n;i++)s*=1.05,s+=(1000-(s%1000==0?1000:s%1000));std::cout<<s<<"\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": []
} | CORRECT | cpp | #include<iostream>
using namespace std;
int main(){
int n,sum = 100000;
cin >>n;
while(n--){
sum = (int)(sum*1.05);
if(sum%1000){sum = (sum/1000)*1000+1000;}
}
cout <<sum<<endl;
return 0;
} |
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | CORRECT | cpp | #include <iostream>
using namespace std;
int main(){
int week, yen=100000, hasuu;
cin>>week;
while(week--){
yen = yen*1.05;
if(hasuu=yen%1000){
yen += 1000-hasuu;
}
}
cout << yen <<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": []
} | CORRECT | python3 | s = 100000
for i in range(int(input())):
s *= 1.05
if s % 1000:
s = s - (s % 1000) + 1000
print(int(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": []
} | CORRECT | python2 | n = input()
debt = 100000
for i in range(n):
debt *= 1.05
if(debt % 1000):
debt -= debt % 1000
debt += 1000
print(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": []
} | CORRECT | java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int a = 100;
for (int i = 0; i < n; i++) {
a = (int)Math.ceil(a * 1.05);
}
System.out.println(a * 1000);
}
} |
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | CORRECT | cpp | #include<iostream>
#include<stdio.h>
int main(){
int n,i,a=100000,b;
std::cin>>n;
for(i=0;i<n;i++){
a=a*1.05;
if(a%1000!=0){
b=a%1000;
b=1000-b;
a=a+b;
}
}
std::cout<<a<<std::endl;
return 0;
} |
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int main(void) {
unsigned int loan = 100000;
int week;
cin >> week;
for (int i = 0; i < week; i++) {
loan *= 1.05;
}
double tmp = (double)loan / 10000;
tmp += 0.5;
loan = (int)tmp;
loan *= 10000;
cout << loan;
}
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | #include <bits/stdc++.h>
int main() {
int d = 100000, n, i;
scanf("%d", &n);
for (i = 0; i < n; i++) {
d *= 1.05;
}
if (d % 10000 != 0) {
d = d - d % 10000 + 10000;
}
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 | UNKNOWN | #include <bits/stdc++.h>
int main() {
int n, i, mny = 100000, intrst = 100000 * 0.05;
while (scanf("%d", &n) > 0) {
for (i = 0; i < n; i++) {
mny += intrst;
}
if (mny % 10000 > 0) {
mny = mny + 10000 - mny % 10000;
}
printf("%d\n", mny);
}
return 0;
}
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | java | import java.util.Scanner;
public class Main {
public static void main(String[] args){
int debt = 100000;
double interest = 0.05;
Scanner s = new Scanner(System.in);
int n = s.nextInt();
for (int i = 0; i < n; i++) {
debt += debt * interest;
}
debt = (int)Math.ceil((double)debt / 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 | UNKNOWN | #include <bits/stdc++.h>
float i, t = 10;
int main(void) {
scanf("%f", &i);
for (; i--; t *= 1.05)
;
printf("%.f0000\n", t);
}
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a 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("%f", x * 1000);
return 0;
}
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
int n = 0;
cin >> n;
double a = 100000;
for (int i = 0; i < n; i++) {
a *= 1.05;
a /= 1000;
a = ceil(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 | UNKNOWN | #include <bits/stdc++.h>
int main(void) {
int n;
int j, a;
double i;
a = 100000;
i = 0.05;
scanf("%d", &n);
for (j = 1; j <= n; j++) {
a = a * (1 + i);
}
if ((a % 10000) >= 5000) {
a = a / 10000;
a = a * 10000;
a = a + 10000;
}
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, 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 > 0) {
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 | #include <iostream>
using namespace std;
int main() {
int n; cin >> n;
int ans = 100000;
int tmp;
for (int i=0; i<n; i++) {
ans *= 1.05;
tmp = ans / 1000 * 1000;
if (tmp != ans) ans = tmp + 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, i, kane = 100000;
cin >> n;
for (i = 0; i < n; i++) {
kane = kane * 1.05;
}
kane = kane - kane % 10000 + 10000;
cout << 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>
using namespace std;
int main() {
int n;
scanf("%d", &n);
double base = 100000;
for (int i = 0; i < n; i++) {
base *= 1.05;
if ((int)base < 1000 && (int)base % 1000 != 0) {
int tmp = (int)base / 1000;
base = tmp + 1000;
}
}
printf("%d\n", (int)base);
}
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | #include <bits/stdc++.h>
int main(void) {
int n, i, a;
double s = 100000, x = 1.05, y = 1, z;
scanf("%d", &n);
for (i = 0; i < n; i++) {
y = y * x;
z = s * y;
a = 10000 * (ceil(z / 10000));
}
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, yen = 100000;
scanf("%d", &a);
for (i = 0; i < a; i++) {
yen *= 1.05;
}
printf("%d\n", ((yen + 5000) / 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 <bits/stdc++.h>
int shakkin(int);
int main() {
int n, henkin;
scanf("%d", &n);
henkin = shakkin(n);
printf("%d", henkin);
return 0;
}
int shakkin(int n) {
int m = 100000, i;
double rishi = 0.05;
for (i = 0; i < n; i++) {
m *= (1 + rishi);
if (m % 1000 > 0) {
m = m - m % 1000;
m += 1000;
}
}
return 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 argc, char *argv[]) {
int n;
double debt = 100000;
cin >> n;
for (int i = 0; i < n; i++) {
debt *= 1.05;
debt = (int)(debt / 1000 + 0.9) * 1000;
}
cout << (int)debt << endl;
return 0;
}
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int weeks;
scanf("%d", &weeks);
int debt = 100000;
for (int i = 0; i < weeks; i++) {
debt = debt * 1.05;
int p = debt / 100;
int q = p / 10;
if (p % 10 > 0) {
q += 1;
}
debt = q * 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 | int main(void){
int week;
int money = 100000;
int i;
scanf("%d", &week);
for(i=0; i<week; i++){
money += money * 0.05;
if(money % 1000 > 0){
money += 1000;
money -= money%1000;
}
}
printf("%d", money);
return 0;
} |
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | java | import java.util.Scanner;
class Main{
public static void main(String[] args){
final Scanner sc=new Scanner(System.in);
int syakkin=100000;
int n=sc.nextInt();
for(int i=0;i<=n;i++){
syakkin*=1.05;
syakkin/=10000;
syakkin*=10000;
}
System.out.println(syakkin);
}
} |
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | a=100000
gets.to_i.times{a=a*105/100;a=(a/1000+1)*1000 if a%1000!=0;}
puts a |
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
double Kiriage(double a) {
a *= 10;
int aI = a;
if (a > aI) {
aI += 1;
}
return 1.0 * aI / 10;
}
int main() {
double debt = 10;
int n;
std::cin >> n;
for (int i = 0; i < n; ++i) {
debt *= 1.05;
debt = Kiriage(debt);
}
std::cout << debt * 10000 << '\n';
}
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | java | import java.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 = 0; i < week; ++i) {
repay = repay.add(repay.multiply(INTEREST));
}
s.close();
System.out.println(repay.divide(new BigDecimal(10000), 0,
BigDecimal.ROUND_CEILING).multiply(new BigDecimal(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 i;
double money = 100000;
cin >> i;
for (; i > 0; i--) {
money += money * 0.05;
}
cout << money << endl;
if (money - (int)money % 10000 > 0) {
money = ((int)money / 10000) * 10000 + 10000.0;
}
cout << money << endl;
}
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, i, ans = 100000, a, risi[2];
cin >> n;
for (i = 1; n >= i; i++) {
risi[0] = ans * 0.05;
risi[1] = risi[0];
while (risi[1] >= 1000) {
risi[1] = risi[1] - 1000;
}
ans = ans + risi[0];
}
cout << ans << endl;
}
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | main(a){scanf("%d",&a);return a>90;} |
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a 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, x = 100000;
scanf("%d", &n);
while (n--) {
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 | UNKNOWN | package main
import (
"fmt"
)
func main() {
const debt = 100000
var week int
fmt.Scan(&week)
totalDebt := debt + week*(5*debt/100)
if week%2 != 0 {
totalDebt += 5000
}
fmt.Println(totalDebt)
}
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a 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() {
stack<int> st;
bool bo = false;
int n, a = 100000;
cin >> n;
for (int i = 0; i < n; i++) {
a += 100000 * 0.05;
}
if (a % 10000 == 0 && a % 1000 == 0 && a % 100 == 0 && a % 10 == 0 &&
a % 10 == 0) {
bo = true;
}
a /= 10000;
if (bo == false) {
a = a + 1;
}
cout << a * 10000 << 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 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 | java | import java.util.InputMismatchException;
import java.util.Scanner;
public class Main {
public static void main (String [] a){
//set constraints and var
int minWeek = 0;
int maxWeek = 100;
double initialDebt = 100000;
double debt = 0;
//get number of weeks
Scanner in = new Scanner(System.in);
System.out.print("Number of weeks: ");
try {
int numWeeks = in.nextInt();
if(numWeeks >= minWeek && numWeeks <= maxWeek){
debt = initialDebt;
if (numWeeks == 0){
} else {
for (int i=0; i<numWeeks; i++){
debt = debt * 1.05;
if(debt%1000 == 0){
} else {
debt = (debt - (debt%1000)) + 1000;
}
}
}
System.out.println("Total debt:" + (int)debt);
} else {
System.out.println("Invalid number");
}
} catch (InputMismatchException e){
System.out.println("Invalid input");
}
}
} |
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a 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;
double y;
scanf("%f", &n);
x = 100;
for (i = 0; 1 <= n; i++) {
x = ceil(x * 1.05);
}
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 | python2 | i=100
for ii in range(int(input())):
i+=i/20
if i!=int(i):
i=int(i+1)
print(str(int(i*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>
int main(void) {
int a = 100000, c;
double b = 100000;
scanf("%d", &c);
for (int i = 0; i < c; i++) {
b *= 1.05;
a = b;
if (a % 1000 != 0) {
b = (b - (a % 1000)) + 1000;
}
a = b;
printf("%d\n", a);
}
printf("%d\n", a);
return 0;
}
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
int ans = 100000;
while (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 | 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);
System.out.println("何週間ですか?");
int week = Integer.parseInt(input.readLine()); // 文字列の入力
if(week >= 100){
System.out.println("100以上は入力できません");
}
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 | cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
double weeks = 0;
double debit = 100.0;
cin >> weeks;
for (int i = 0; i < weeks; i++) {
debit = debit + debit * 0.05;
debit = ceil(debit);
}
cout << debit * 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 | money = 100000
week = gets.chomp.to_i
week.times do |n|
money *= 1.05
if money % 1000 > 0
money = (money / 1000) * 1000 + 1000
end
end
puts money.to_i |
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | debt = 100000
n = gets.chomp.to_i
n.times do
debt *= 1.05
debt = debt - (debt % 1000)
end
puts debt.to_i |
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | #include<stdio.h>
int main(void) {
int i,n, j;
double debt = 100000;
scanf_s("%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 | UNKNOWN | #include <bits/stdc++.h>
int main(void) {
int n, i, s;
scanf("%d", &n);
s = 100000;
for (i = 0; i < n; i++) {
s *= 1.05;
if (s % 1000 != 0) {
s = (s / 10000) + 1 * 1000;
}
}
printf("%d\n", 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 | UNKNOWN | #include <bits/stdc++.h>
int main(void) {
int week;
int pay = 100000;
double rate = 1.05;
scanf("%d", &week);
while (week) {
pay *= rate;
if (pay % 1000) {
pay = (pay / 1000 + 1) * 1000;
}
week--;
}
printf("%d\n", pay);
}
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a 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 >= 1000) debt += 10000;
debt -= debt % 10000;
printf("%ld\n", debt);
return 0;
}
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | i;main(){puts("13530000")&&i;} |
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | p (10*(1.05**gets.to_i)+0.4).round*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 argc, char *argv[]) {
int n;
double debt = 100000;
cin >> n;
for (int i = 0; i < n; i++) {
debt *= 1.05;
debt = (int)(debt / 1000 + 0.9) * 1000;
}
cout << debt << endl;
return 0;
}
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <iostream>
using namespace 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 | UNKNOWN | #include <bits/stdc++.h>
int main(void) {
int a = 100, n, t;
scanf("%d", &n);
for (t = 0; t < n; t++) {
a = ceil(a * 1.05);
}
printf("%d", 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 | cpp | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int i, n;
double ans;
cin >> n;
ans = 100.000;
for (i = 0; i < n; i++) {
ans *= 1.05;
ans = int(ans + 0.999);
ans = double(ans);
}
ans *= 1000;
ans = int(ans);
cout << ans << endl;
return 0;
}
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | #include <bits/stdc++.h>
int main() {
int i, n;
scanf("%d", &n);
if (n == 0) {
printf("%d\n", 100000);
return 0;
}
double result = 100000;
for (i = 0; i < n; i++) {
result = result * 1.05;
}
printf("%d\n", (int)(1000 * ceil(result / 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 | python3 | week = int(input())
def myround(value, digit=0):
p = 10 ** digit
return (value * p * 2 + 1) // 2 / p
print(int(myround(100000 * (1 + 0.05)**week, -4)))
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | #include <bits/stdc++.h>
int main() {
int n;
int i;
int debt;
debt = 100000;
scanf("%d", &n);
for (i = 0; i < n; i++) {
debt *= 1.05;
}
if (debt / 10000 > 0) {
debt = (debt / 10000 + 1) * 10000;
}
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 | python3 | inp = int(input())
debt = 100000
num = 0
lisdeb = []
stdeb = ""
for i in range(inp):
#debt *= 1.05
debt +=6000
debt = int(debt)
print(debt)
for i2 in range(len(str(debt))-1):
lisdeb.append(str(debt)[i2])
lisdeb.append(str(debt)[-1])
for i2 in range(len(lisdeb)):
if i2 == len(lisdeb)-3:
stdeb += "0"
elif i2 == len(lisdeb)-2:
stdeb += "0"
elif i2 == len(lisdeb)-1:
stdeb += "0"
else:
stdeb += lisdeb[i2]
debt = int(stdeb)
lisdeb = []
stdeb = ""
print(debt) |
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | #include <bits/stdc++.h>
int main(void) {
int i, n, debt = 100000;
scanf("%d", &n);
for (i = 0; i < n; i++) {
debt = debt * 1.05 + 999;
debt = debt / 1000 * 1000;
}
printf("%d", 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.math.BigDecimal;
import java.util.Scanner;
class Main {
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 = 0; i < week; ++i) {
repay = repay.add(repay.multiply(INTEREST).setScale(-4,
BigDecimal.ROUND_CEILING));
}
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 | UNKNOWN | #include <bits/stdc++.h>
int main() {
int c, d, m = 100000;
scanf("%d", &d);
for (c = 0; c < d; c++) {
m *= 1.05;
m = (m % 1000) ? (m / 1000 + 1) * 1000 : m;
}
printf("%d", 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 n, debt = 100000;
double risi = 1.05;
cin >> n;
for (int i = 0; i < n; i++) {
debt *= risi;
debt += 1000 - (debt % 1000);
}
cout << debt << endl;
return 0;
}
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | cpp | #include <bits/stdc++.h>
using namespace std;
int n;
int main() {
cin >> n;
int ans = 100000;
for (int i = 0; i < n + 1; ++i) {
ans *= 1.05;
}
string s = to_string(ans);
int n = s.size();
for (int i = 0; i < 4; ++i) {
s[n - 1 - i] = '0';
}
cout << s << 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;
void func();
int main(void) {
func();
return 0;
}
void func() {
int n, debt;
debt = 100000;
cin >> n;
while (n-- > 0) {
debt = debt + debt * 0.05;
if (debt % 1000 > 0) debt += 1000 - 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 | cpp | #include <bits/stdc++.h>
using namespace std;
template <class T>
inline void chmax(T& a, T b) {
if (b > a) a = b;
}
template <class T>
inline void chmin(T& a, T b) {
if (b < a) a = b;
}
int main() {
int N;
double money = 100000;
cin >> N;
for (int i = 0; i < (int)(N); i++) {
money = money * 1.05;
money = ceil(money / 1000) * 1000;
}
cout << money << endl;
return 0;
}
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | #include<stdio.h>
int main(){
int a,b,c,d,n,z;
z=0;
scanf("%d",&n);
if(n>50){
break;
}
for(a=0;a<10;a++){
for(b=0;b<10;b++){
for(c=0;c<10;c++){
for(d=0;d<10;d++){
if(a+b+c+d==n){
z++;
}
}
}
}
}
printf("%d\n",z);
return 0;
} |
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | java | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int n = 100000;
while(scan.hasNext()){
int x = scan.nextInt();
int m = n;
for(int i = 0;i < x;i++){
m = m + (int)(m*0.05);
}
int t = m % 10000;
if(t != 0){
m = m - t + 10000;
}
System.out.println(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 | UNKNOWN | #include <bits/stdc++.h>
int main(void) {
int n, x = 100000;
scanf("%d", &n);
for (; n > 0; n--) x += 5 * x / 100, x = (x + 999) / 1000 * 1000;
printf("%d\n", 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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine();
int n = Integer.parseInt(str);
int m = 100000;
int f = 100000;
for(int i=0; i<n; i++){
m += (f/20);
}
if(m%10000 != 0){
m += 5000;
}
System.out.println(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 | UNKNOWN | #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 += 5;
coin /= 10;
coin *= 10;
coin += 50;
coin /= 100;
coin *= 100;
coin += 500;
coin /= 1000;
coin *= 1000;
}
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 | java | import java.util.Scanner;
import java.math.BigDecimal;
public class Main{
private int first;
DebtHell(int yen){
first = yen;
}
int calculate(int yen){
BigDecimal bd = new BigDecimal(yen*1.05);
BigDecimal bd1 = bd.setScale(-4, BigDecimal.ROUND_HALF_UP);
return bd1.intValue();
}
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
DebtHell Deb = new DebtHell(100000);
int n = scan.nextInt();
int yen = 100000;
for(int i=0;i<n-2;i++){
yen =Deb.calculate(yen);
}
System.out.println(yen);
scan.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 | import std.stdio,
std.math,
std.string,
std.conv;
void main() {
double m = 100000;
int n = readln.chomp.to!int;
foreach (int i; 0..n) {
m *= 1.05;
if (m % 1000 != 0)
m = m + (1000 - m%1000);
}
writeln(m);
} |
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | python3 | n = int(input())
r=lambda x:(x*2+1)//2
ans = int(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 | UNKNOWN | <?php
while(true) {
fscanf(STDIN, "%d", $w);
if(feof(STDIN))
break;
$b = 100000;
for ($i=0;$i<$w;$i++) {
$b = $b * 1.05;
$c = 1000 * ceil($b/1000);
printf("%d => %d", $b, $c);
$b = $c;
echo PHP_EOL;
}
printf("%d", $b);
echo PHP_EOL;
} |
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine();
double n = Double.parseDouble(str);
double interest = 0.5;
double m = 10000;
System.out.println((int)(100000 + m * Math.round(n*interest)));
}
} |
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a 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) {
try (Scanner scan = new Scanner(System.in)) {
int week = scan.nextInt();
double debt = 100000;
for (int i = 0; i < week; i++) {
debt *= 1.05;
System.out.println(debt);
if (debt % 1000 > 0) {
debt += 1000 - debt % 1000;
}
System.out.println(debt);
}
System.out.println(debt);
} catch (Exception e) {
System.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;
int re = 100000;
int i;
scanf("%d", &n);
for (i = 0; i < n; i++) {
re += 100000 * 0.05;
}
re = (re + 10000) / 10000 * 10000;
printf("%d\n", re);
return (0);
}
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | #include <bits/stdc++.h>
int main(void) {
int n, i, s;
scanf("%d", &n);
s = 100000;
for (i = 0; i < n; i++) {
s *= 1.05;
}
if (s % 10000 != 0) {
s = ((s / 10000) + 1) * 10000;
}
printf("%d\n", 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 | python3 | n = int(input())
debt = 100000
for i in range(n):
debt = debt * 1.05
round = debt % 1000
if round != 0:
debt = (debt // 1000 + 1) * 1000
print(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 | java | import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner sc =new Scanner(System.in);
int n=sc.nextInt();
int money =100000;
for(; n>0; n--) money+=money*0.05;
if(money/10000*10000<money)money=money/10000*10000+10000;
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 | UNKNOWN | #include <bits/stdc++.h>
int main(void) {
int debt = 100000;
int interest = 5;
int money = debt;
int n;
scanf("%d", &n);
while (n--) {
money += money * interest / 100;
}
printf("%d\n", (int)ceil(money / 10000.0) * 10000);
return 0;
}
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | #include <bits/stdc++.h>
int main(void) {
int debt = 100000, a, i;
scanf("%d", &a);
for (i = 0; i < a; i++) {
debt = debt * 1.05;
if (debt % 1000) debt = debt - debt % 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 | cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
double debt = 10;
const double risi = 0.05;
cin >> n;
for (int i = 0; i < n; i++) {
debt += debt * risi;
}
cout << ceil(debt) * 10000 << 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 static java.lang.Math.*;
import static java.util.Arrays.*;
public class Main {
int INF = 1 << 28;
void run() {
Scanner sc = new Scanner(System.in);
int n= sc.nextInt();
int p = 100000;
for(int i=0;i<n;i++) {
p = (int)(p * 1.05);
// System.out.println(p);
if(p%1000 > 0) p -= p%1000 - 1000;
System.out.println(p);
}
// System.out.println(p);
}
public static void main(String[] args) {
new Main().run();
}
void debug(Object... os) {
System.err.println(Arrays.deepToString(os));
}
} |
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a 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 in = new Scanner(System.in);
double debt = 10;
int N = in.nextInt();
for(int i=0;i<N;i++){
debt = Math.ceil(debt*1.05*10)/10;
}
System.out.printf("%.0f",debt*10000);
}
} |
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | #include <bits/stdc++.h>
int main(void) {
int r = 100000;
int n, i;
scanf("%d", &n);
for (i = 0; i < n; i++) {
r = r * 1.05;
}
if (r % 1000 > 0) {
r = r / 1000 * 1000 + 1000;
}
printf("%d\n", r);
return 0;
}
|
p00007 Debt Hell | Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.
Write a program which computes the amount of the debt in n weeks.
Input
An integer n (0 ≤ n ≤ 100) is given in a line.
Output
Print the amout of the debt in a line.
Example
Input
5
Output
130000 | {
"input": [
"5"
],
"output": [
"130000"
]
} | {
"input": [],
"output": []
} | IN-CORRECT | UNKNOWN | money = 100000
week = gets.chomp.to_i
week.times do |n|
money *= 1.05
if money % 1000 > 0
money = (money / 1000) * 1000 + 1000
end
end
puts 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() {
int week;
double husai = 100;
double rishi;
scanf("%d", &week);
for (int i = 0; i < week; i++) {
rishi = ceil((husai * 5) / 100);
husai = husai + rishi;
}
husai = husai * 1000;
printf("%.f\n", husai);
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 DeptHell {
// ????????????10??????
public static int LOAN = 100000;
public static void main(String[] args) {
// ???????????????
Scanner sc = new Scanner(System.in);
int input = sc.nextInt();
// ??????????????????
double result = LOAN + (LOAN * 0.05) * input;
// ????????\?????????????????????
// ????????\???????°???°?????????
result = result / 10000;
// ?°???°???????????????
result = Math.ceil(result);
// ?????????????????????
result = result * 10000;
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 | python3 | import math
a = 100000
n = int(input())
for _ in range(n):
a *= 1.05
print(math.ceil(a/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 | week=int(input())
money=100000
for i in range(week):
money=money*1.05
if money%1000!=0:
money=1000*(money//1000+1)
print(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 Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int n = s.nextInt();
int m = 100000;
for (int i = 0; i < n; i++) {
m = Double.valueOf(Math.ceil((double) m * 1.05)).intValue();
int r = m % 1000;
if (r > 0) {
m += 100 - r;
}
}
System.out.println(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 | UNKNOWN | #include <bits/stdc++.h>
int main() {
int x = 100000;
double temp;
int i, n;
scanf("%d", &n);
for (i = 0; i < n; i++) {
temp = (double)(x * 1.05);
temp = temp / 1000;
x = (int)(temp + 0.9);
x = 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 | UNKNOWN | main(a){scanf("%d",&a);return a>50;} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.