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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
main(){printf("13530000\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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n; int i; double money = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { money *= 1.05; } if ((int)money % 10000 != 0) { money = ((int)money / 10000 + 1) * 10000; } printf("%.0lf\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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include<stdio.h> main(){ int n,i,x,xx; doble sum=100000; scanf("%d",&n); for(i=0;i<n;i++){ sum=sum*1.05; x=sum/1000; x=x*1000; // y=sum-x; if(sum-x > 0){ x=x+1000; } sum=x; } printf("%d\n",x); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
python3
debt=10**5 interest=5/100 n=int(input()) for week in range(n): debt=debt*(1+interest) if debt%1000>0: debt=debt+1000-(debt%1000) print(debt)
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int ans = 100000; for (int i = 0; i < n; i++) ans += ans * 5 / 100; if (ans % 10000) ans += (10000 - ans % 10000); 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; double money = 100000; cin >> n; if (n < 100) { for (int i = 0; i < n; i++) { money += (money * 0.05); } money = ((int)money / 10000) * 10000 + 10000; cout << money << endl; } return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <stdio.h> int main() { int d=100000,n,i; scanf("%d",&n); for(i=0;i<n;i++){ d*=1.05 } d=(int)d; 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
main(n,r){for(scanf("%d",&n),r=1e5;n--;r=r%1e3?(r/1e3+1)*1e3:r)r+=r/20;printf("%d\n",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 g...
{ "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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
main(i){i=0&puts("13530000");}
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n, i; long debt; scanf("%d", &n); debt = 100000; for (i = 1; i <= n; i++) { debt = debt + debt / 20; if (debt % 1000 != 0) { debt = debt + (1000 - debt % 1000); } 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> int main() { int a; std::cin >> a; double result = 100; for (int i = a; i; i--) { result *= 1.05; result = (int)(result + 0.9); } result *= 1000; std::cout << result; return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n, debt, i, amari, real; scanf("%d", &n); debt = 100000; for (i = 0; i < n; i++) { debt = debt * 1.05; } amari = debt % 1000; real = debt - amari + 1000; printf("%d\n", real); 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
package hoge.hoge.com; import java.io.*; import java.lang.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader buf = new BufferedReader(new InputStreamReader(System.in)); int week = Integer.parseInt(buf.readLine()); System.out.println(risi(week)); } ...
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
using System; using System.Collections.Generic; using System.Text; namespace mondai0007 { class Program { static double rishi = 0.05; static int Main(string[] args) { double gankin = 100000; double input = double.Parse(Console.ReadLine()); int zougak...
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> int main(void) { int n; std::cin >> n; std::cout << 10 * pow(1.05, n) << 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int n; int i; int counter = 0; double a; scanf("%d", &n); for (i = 0; i < n; i++) { if (counter == 0) { a = 100000; } a = a * 1.05; a = a / 1000; a = ceil(a); a = a * 1000; counter++; } printf("%f\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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, debt = 100000; cin >> n; for (int i = 0; i < n; i++) { debt *= 1.05; } debt += 9999; debt /= 10000; debt *= 10000; 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
object Main extends App { val sc = new java.util.Scanner(System.in) val n = sc.nextInt var num: BigInt = 100000 for(i <- 0 until n-1) { num += num / 20 if(num%10!=0) { num = num / 10 num = num * 10 + 10 } if(num%100!=0) { num = num / 100 num = num * 100 + 100 } if...
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
public static void main(String args[]) { Scanner in = new Scanner(System.in); int inputNum = in.nextInt(); System.out.println(getNowShakkin(inputNum)); } public static int getNowShakkin(int weekInterval) { double result = 100; for (int i = 0; i < weekInterval; i++) { result = result + (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 g...
{ "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 money { public static void main(String[] args) throws IOException { System.out.println("??´??°?????\????????????????????????"); //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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int n, i; double d = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { d *= 1.05; d = ceil(d / 1000) * 1000; } printf("%.0f\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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <stdio.h> #include <math.h> int main(void) { int n; double y; scanf("%f",&n); printf("%f",pow(100000,y)); } return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n; scanf("%d", &n); double sum = 100000.0; int i; for (i = 0; i < n; i++) { sum = sum * 1.05; sum /= 1000.0; sum = ceil(sum); sum *= 1000.0; } int sum_i = (int)sum; printf("%d\n", sum_i); }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
python2
n=input() loan=10**5 for i in xrange(n): loan+=loan*0.05 if loan%1000!=0: loan-=loan%1000 loan+=10**3 else: loan-=loan%1000 print(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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> int main() { int n, i, kane = 100000, a, b; std::cin >> n; for (i = 0; i < n; i++) { kane = kane * 1.05; if (kane % 1000 != 0) { a = kane % 1000; b = 1000 - a; kane = kane + b; } } std::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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> int main() { int n; double debt; scanf("%d", &n); for (int i = 0; i < n; i++) { debt = debt + debt * 0.05; } debt = debt - (int)debt % 1000; debt = 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
package debt_hell; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigDecimal; /** * 0007:Debt Hellの解答 * * @author MS14A * @version 2015/04/15 */ public class Main { /** 初期借金額:10万円 */ private static final BigDecimal INITIAL_DEBT = BigDecimal...
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { static float debt = 100000; public static void main(String[] args) throws IOException { int n; float hell = debt; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); n = ...
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int DEBT = 100000; int i, n; scanf("%d", &n); for (i = 0; i <= n; i++) { DEBT *= 1.05; 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; while (cin >> n) { int cur = 100000; for (int i = 0; i < n; i++) { cur = 1.05 * cur; cur = cur / 1000 * 1000; } cout << cur << 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
function Main(input){ var n=parseInt(input.split('\n')[0]),a=100; while(n--)a+=Math.ceil(a*5/100); console.log(a*100); } Main(require("fs").readFileSync("/dev/stdin", "utf8"));
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; double x = 100000.0; cin >> n; for (int i = 0; i < n; i++) x += x * 0.05; cout << (int)(x / 10000 + 0.9) * 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include<stdio.h> int main(void) { int n float p scanf("%d",&n); p=1.05; for(i=0;i<n;i++){ w=100000*p; if(1000%w>0){ w=w-(1000%w)+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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
include<stdio.h> int main(void) { int n; int debt = 100000; scanf("%d",&n); while ( n-- > 0 ) { debt *= 1.05; if ( debt % 1000 ) { debt /= 1000; debt += 1; debt *= 1000; } } printf("%d\n", debt); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n, i; int sum = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { sum += sum * 0.05; } if (sum % 1000 > 0) { sum /= 10000; sum *= 10000; sum += 10000; } printf("%d\n", 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { double n, mon = 100000; cin >> n; for (int i = 0; i < n; i++) { mon = mon * 1.05; mon = (mon + 999) - (int(mon + 999) % 1000); } cout << mon << 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
import std.stdio,std.conv,std.string,std.math; void main(){ double money = 100000; while(true){ char[] buf; stdin.readln(buf); double x = buf.chomp().to!double(); if(0 <= x && x <= 100){ for(int i = 0;i < x;i++){ money = money + (money * 0.05); ...
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
<?php fscanf(STDIN, "%d", $n); $debt = 100000; for($i = 1; $i < $n; $i++){ $debt = ceil(($debt * 1.05)/1000) * 1000; } echo $debt."\n"; ?>
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> int main() { double yami = 100.000; int n; std::cin >> n; for (int i = 0; i < n; ++i) { yami *= 1.05; if (ceil(yami) != floor(yami)) { yami = ceil(yami); } } yami *= 1000; std::cout << yami << '\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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int n, i; double a = 10, j, m, o; scanf("%d", &n); for (i = 0; i < n; i++) { j += a * 0.05; } double k = ceil(j); m = k + 10; o = m * 10000; printf("%f\n", o); 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int num = 100000, n, i; double numd; scanf("%d", &n); if (n <= 100 || n > 0) { for (i = 1; i <= n; i++) { num = num * 1.05; } numd = num / 1000; numd = numd + 0.999; num = (int)numd * 1000; printf("%d\n", num); } return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main() { int n, i, p, a = 100000; scanf("%d", &n); for (i = 1; i <= n; i++) { p = (a * 5) / 100; a = a + p; if (a % 1000 != 0) { a = a - (a % 1000) + 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.io.*; class Main{ public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); double x = Double.parseDouble(br.readLine()); double y = 100000; long z = 0; for (long i=0; i<x; i...
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> int main(void) { int n, i; scanf("%d", &n); n = n * 5; n = 1000 * n; n = 100000 + n; i = n % 10000; if (i != 0) { i = 10000 - i; n = n + i; } printf("%d\n", 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int bor_money = 100000, n; cin >> n; for (int i = 0; i < n; i++) { bor_money *= 1.05; } if (5000 <= (bor_money % 10000)) { bor_money /= 10000; bor_money += 1; bor_money *= 10000; } cout << bor_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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> const static double de_PI = 3.14159265358979323846; const static int de_MOD = 1000000007; const static int de_MAX = 999999999; const static int de_MIN = -999999999; int main(void) { int a = 0; std::cin >> a; double n = 100000; for (int i = 0; i < a; i++) { n = n * 1.05; n = stat...
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#!/usr/local/bin/ruby n=gets.to_i x=100000 n.times{ x=x+x*0.05 if x%1000!=0 x=x-x%1000+1000 end } puts"#{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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.*; import java.math.*; class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); double sum = 100000; for(int i=0;i<n;i++){ sum=sum+sum*0.05; BigDecimal bi = new BigDecimal(String.valueOf(sum)); sum = bi.setScale(-3,BigDecimal.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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n, debt, i, amari, real; scanf("%d", &n); debt = 100000; for (i = 0; i < n; i++) { debt = debt * 1.05; amari = debt % 1000; if (amari != 0) { real = debt - amari + 1000; printf("%d\n", real); } else { printf("%d\n", debt); } }...
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int i, n, j, k; double debt = 100000; scanf("%d", &n); for (i = 0; i < n; i++) { debt = debt * 1.05; j = debt; j = j / 1000 + 1; debt = j * 1000; } k = debt; printf("%d\n", k); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); int weeks = s.nextInt(); double debt = 100; while(weeks>0){ debt = debt*1.05; debt = (int)Math.ceil(debt); weeks--; } ...
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
python3
import sys def main(): n = int(input().rstrip()) r = 1.05 digit = -4 a = 100000 print(int(round(a*(r**n), digit))) 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int week, money = 100000, i; int tmp; scanf("%d", &week); for (i = 0; i < week; i++) { money = money * 1.05; tmp = money % 1000; if (tmp > 0) { money = money + 1000 - tmp; } } 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
import Control.Applicative main = do w <- read <$> getLine print $ show $ (ceiling $ ((1.05^w)*100))*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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << 100000 + (5000 * n + n * 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n; int debt; int i; scanf("%d", &n); debt = 100000; for (i = 0; i < n; i++) { debt += 5000; if (debt / 1000 != 0) { debt /= 1000; debt += 1; debt *= 1000; } } printf("%d\n", debt); return (0); }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int n, money = 100000; scanf("%d", &n); money *= pow(1.05, n); printf("%d\n", money / 10000 * 10000 + 10000); return (0); }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { long double x = 100000, w; int i, n, y; while (cin >> n) { for (i = 1; i <= n; i++) { x = x * 1.05; y = x; y = y / 100; x = y; x = x / 10; x = ceil(x); x = x * 1000; } cout << x << endl; } }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int NumOfWeeks; int CurrentDebt = 100000; scanf("%d", NumOfWeeks); int i; for (i = 0; i < NumOfWeeks; i++) { CurrentDebt = CurrentDebt / 100 + CurrentDebt; } printf("%d", CurrentDebt); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; double debt = 10000; cin >> n; for (int i = 0; i < n; i++) { debt *= 1.05; } int result = (int)debt; result /= 1000; result++; result *= 1000; cout << result << 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; struct omt { omt() { ios::sync_with_stdio(false); cin.tie(0); } } star; int main() { double n; cin >> n; double ans = 100000; for (int i = 0; i < n; i++) { ans *= 1.05; if ((int)ans % 1000 > 0) { ans -= (int)ans % 1000; ans += 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int i, j, money = 100000, debt, week, surplus; scanf("%d", &week); for (i = 0; i < week; i++) { debt = money * 1.05; surplus = debt % 1000; if (surplus) { money = debt + 1000 - surplus; } money = debt; } printf("%d\r\n", debt); return 0; }
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "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 weeks = Integer.parseInt(str); ...
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.io.*; class Main{ public static void main(String[]args)throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); double result = 100000; for(int i=0; i<n; i++){ result *= 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.Scanner; import java.math.BigDecimal; public class Main{ static 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...
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "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> * ??????????????????...
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int debt = 100000; int week; cin >> week; for (int i = 0; i < week; ++i) { (debt /= 100) *= 105; if (debt % 1000 > 0) { ++debt; 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
include <stdio.h> int main(void){ int n, i, debt; debt=100000; scanf("%d", &n); for(i=0; i<n; i++){ debt=debt+(debt/20); if(debt%1000!=0) debt=debt+(1000-(debt%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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
cpp
#include <bits/stdc++.h> int main() { int n; int a = 100; scanf("%d", &n); for (int i = 0; i < n; i++) { if (a % 100) { a = a * 1.05 + 1; } else { a *= 1.05; } } printf("%d000\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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
import std.stdio; import std.string; import std.conv; import std.math; void main () { double a = 100000; int n = to!int(chomp(readln())); foreach (i; 0 .. n) { a = ceil(a * 1.05 / 1000.0) * 1000; } writeln(to!int(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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
import std.stdio,std.conv,std.string,std.math; void main(){ double money = 100000; while(true){ char[] buf; stdin.readln(buf); double x = buf.chomp().to!double(); if(0 <= x && x <= 100){ for(int i = 0;i < x;i++){ money *= 1.05; } ...
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "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; cout << debt << endl; if (debt % 1000 > 0) 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
print("??´??° n") n = gets.chomp.to_i sum = 100000 for i in 1..n sum = sum * 1.05 amari = sum%1000 if amari!=0 sum = sum + 1000 - amari end end print sum.to_i.to_s
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Scanner; public class Main { //http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0007&lang=jp public static void main(String args[]) throws NumberFormatException, IOException { BufferedReader br =...
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int week = scan.nextInt(); double debt = 100000; for(int i = 0; i < week; i++) { debt *= 1.05; } int ans = (int)(debt * 0.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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
python3
import math a = 100000 for n in range(int(input())): a = math.ceil(a*105/100) print(int(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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { static float debt = 100000; public static void main(String[] args) throws IOException { int n; float hell = debt; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); n = ...
p00007 Debt Hell
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week. Write a program which computes the amount of the debt in n weeks. Input An integer n (0 ≤ n ≤ 100) is g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
#include <bits/stdc++.h> int main(void) { int a, b = 100000, c, i; scanf("%d", &a); for (i = 1; i <= a; i++) { b = b * 1.05; } if (b % 1000 != 0) { c = b / 10000 + 1; } printf("%d", c * 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 g...
{ "input": [ "5" ], "output": [ "130000" ] }
{ "input": [], "output": [] }
IN-CORRECT
UNKNOWN
n;main(d){for(d=scanf("%d",&n)+99;n--;d=d*1.05+.99);n=!printf("%d",d*1000);}
p00139 Snakes
In a world, a mysterious snake made of only letters lives. Two types of snakes are currently identified, type A and type B, but there may be other types as well. For class A, after ">'" is followed by one or more "=", "#" comes, and after the same number of "=" as before, "~" (half-width tilde) finish. Class B ends w...
{ "input": [ "3\n>'======#======~\n>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~\n>'===#====~" ], "output": [ "A\nB\nNA" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include<iostream> #include<regex> #include<string> int main() { int n; std::cin >> n; std::cin.ignore(); while( n-- ) { std::string s; std::getline( std::cin, s ); std::smatch m; if( std::regex_match( s, m, std::regex( ">\'(=+)#(=+)~" ) ) && m[1].length() == m[2].length() ) std::cout << 'A' << std::...
p00139 Snakes
In a world, a mysterious snake made of only letters lives. Two types of snakes are currently identified, type A and type B, but there may be other types as well. For class A, after ">'" is followed by one or more "=", "#" comes, and after the same number of "=" as before, "~" (half-width tilde) finish. Class B ends w...
{ "input": [ "3\n>'======#======~\n>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~\n>'===#====~" ], "output": [ "A\nB\nNA" ] }
{ "input": [], "output": [] }
CORRECT
python3
import re SNAKE_A = re.compile(r">'(=+)#\1~") SNAKE_B = re.compile(r">\^(Q=)+~~") def answer(regex, string, output): result = regex.fullmatch(string) if result is not None: print(output) else: print("NA") for _ in range(int(input())): snake = input() if snake[1] == "'": ...
p00139 Snakes
In a world, a mysterious snake made of only letters lives. Two types of snakes are currently identified, type A and type B, but there may be other types as well. For class A, after ">'" is followed by one or more "=", "#" comes, and after the same number of "=" as before, "~" (half-width tilde) finish. Class B ends w...
{ "input": [ "3\n>'======#======~\n>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~\n>'===#====~" ], "output": [ "A\nB\nNA" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <bits/stdc++.h> #define rep(i,l,n) for(int i=l;i<n;i++) #define all(a) a.begin(),a.end() #define o(a) cout<<a<<endl #define int long long using namespace std; typedef vector<int> vi; typedef vector<vi> vvi; typedef pair<int,int> pii; signed main(){ int n; cin>>n; rep(i,0,n){ string s; cin>>s; int ans...
p00139 Snakes
In a world, a mysterious snake made of only letters lives. Two types of snakes are currently identified, type A and type B, but there may be other types as well. For class A, after ">'" is followed by one or more "=", "#" comes, and after the same number of "=" as before, "~" (half-width tilde) finish. Class B ends w...
{ "input": [ "3\n>'======#======~\n>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~\n>'===#====~" ], "output": [ "A\nB\nNA" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include<iostream> using namespace std; string in; int isA(){ if(in.length() < 5) return 0; if(in[0] != '>') return 0; if(in[1] != '\'') return 0; if(!(in[in.length()-1] == '~' && in[in.length()-2] == '=')) return 0; int data[2] = {0,0}; int status = 0; for(int i = 2; i < in.length()-1; i++){ if(in...
p00139 Snakes
In a world, a mysterious snake made of only letters lives. Two types of snakes are currently identified, type A and type B, but there may be other types as well. For class A, after ">'" is followed by one or more "=", "#" comes, and after the same number of "=" as before, "~" (half-width tilde) finish. Class B ends w...
{ "input": [ "3\n>'======#======~\n>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~\n>'===#====~" ], "output": [ "A\nB\nNA" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include "bits/stdc++.h" #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; int a; bool check(const string st,const int isa) { a = 0; if (isa) { if (st[a] != '>')return false; a++; if (st[a] != '\'')return false; a++; int num = 0; while (st[a] == '=') { ...
p00139 Snakes
In a world, a mysterious snake made of only letters lives. Two types of snakes are currently identified, type A and type B, but there may be other types as well. For class A, after ">'" is followed by one or more "=", "#" comes, and after the same number of "=" as before, "~" (half-width tilde) finish. Class B ends w...
{ "input": [ "3\n>'======#======~\n>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~\n>'===#====~" ], "output": [ "A\nB\nNA" ] }
{ "input": [], "output": [] }
CORRECT
java
import java.util.Scanner; public class Main{ public static void main(String args[]) { Scanner sc = new Scanner(System.in); int n; n = sc.nextInt(); for (int i = 0; i < n; i++) { String snake = sc.next(); String answer = "NA"; int index = 0; if (6 <= snake.length()) { if (snake.charAt(0) == '>...
p00139 Snakes
In a world, a mysterious snake made of only letters lives. Two types of snakes are currently identified, type A and type B, but there may be other types as well. For class A, after ">'" is followed by one or more "=", "#" comes, and after the same number of "=" as before, "~" (half-width tilde) finish. Class B ends w...
{ "input": [ "3\n>'======#======~\n>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~\n>'===#====~" ], "output": [ "A\nB\nNA" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <iostream> #include <string> #define REP(i,k,n) for(int i=k;i<n;i++) #define rep(i,n) for(int i=0;i<n;i++) using namespace std; int main() { int n; cin >> n; rep(i,n) { string s; cin >> s; if(s[0] == '>' && s[1] == '\'' && s[2] == '=') { int i = 2; int cnt = 0; while(s[i] == '=') ...
p00139 Snakes
In a world, a mysterious snake made of only letters lives. Two types of snakes are currently identified, type A and type B, but there may be other types as well. For class A, after ">'" is followed by one or more "=", "#" comes, and after the same number of "=" as before, "~" (half-width tilde) finish. Class B ends w...
{ "input": [ "3\n>'======#======~\n>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~\n>'===#====~" ], "output": [ "A\nB\nNA" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include "bits/stdc++.h" using namespace std; typedef vector<int> vi; typedef pair<int,int> pii; typedef long long ll; #define dump(x) cerr << #x << " = " << (x) << endl #define rep(i,n) for(int i=0;i<(n);i++) #define all(a) (a).begin(),(a).end() #define pb push_back string solve(string s){ if(s.substr(0,2)==...
p00139 Snakes
In a world, a mysterious snake made of only letters lives. Two types of snakes are currently identified, type A and type B, but there may be other types as well. For class A, after ">'" is followed by one or more "=", "#" comes, and after the same number of "=" as before, "~" (half-width tilde) finish. Class B ends w...
{ "input": [ "3\n>'======#======~\n>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~\n>'===#====~" ], "output": [ "A\nB\nNA" ] }
{ "input": [], "output": [] }
CORRECT
cpp
//include //------------------------------------------ #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <i...
p00139 Snakes
In a world, a mysterious snake made of only letters lives. Two types of snakes are currently identified, type A and type B, but there may be other types as well. For class A, after ">'" is followed by one or more "=", "#" comes, and after the same number of "=" as before, "~" (half-width tilde) finish. Class B ends w...
{ "input": [ "3\n>'======#======~\n>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~\n>'===#====~" ], "output": [ "A\nB\nNA" ] }
{ "input": [], "output": [] }
CORRECT
python3
import re A = ">'(=+)#\\1~$" B = ">\^(Q=)+~~$" for i in range(int(input())): s = input() r = re.match(A, s) if re.match(A, s): print('A') elif re.match(B, s): print('B') else: print('NA')
p00139 Snakes
In a world, a mysterious snake made of only letters lives. Two types of snakes are currently identified, type A and type B, but there may be other types as well. For class A, after ">'" is followed by one or more "=", "#" comes, and after the same number of "=" as before, "~" (half-width tilde) finish. Class B ends w...
{ "input": [ "3\n>'======#======~\n>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~\n>'===#====~" ], "output": [ "A\nB\nNA" ] }
{ "input": [], "output": [] }
CORRECT
python2
import re snakeA = re.compile('>\'(=+)#\\1~$') snakeB = re.compile('>\^(Q=)+~~$') for i in xrange(input()): s = raw_input() if snakeA.match(s) is not None: print "A" elif snakeB.match(s) is not None: print "B" else: print "NA"
p00139 Snakes
In a world, a mysterious snake made of only letters lives. Two types of snakes are currently identified, type A and type B, but there may be other types as well. For class A, after ">'" is followed by one or more "=", "#" comes, and after the same number of "=" as before, "~" (half-width tilde) finish. Class B ends w...
{ "input": [ "3\n>'======#======~\n>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~\n>'===#====~" ], "output": [ "A\nB\nNA" ] }
{ "input": [], "output": [] }
CORRECT
python2
import re ptn_A = r'>\'(=+)#(=+)~' ptn_B = r'>\^(Q=)+~~' for i in range(int(raw_input())): snake = raw_input() matchA = re.search(ptn_A, snake) matchB = re.search(ptn_B, snake) if matchA and matchA.group(1) == matchA.group(2): print 'A' elif matchB: print 'B' else: prin...
p00139 Snakes
In a world, a mysterious snake made of only letters lives. Two types of snakes are currently identified, type A and type B, but there may be other types as well. For class A, after ">'" is followed by one or more "=", "#" comes, and after the same number of "=" as before, "~" (half-width tilde) finish. Class B ends w...
{ "input": [ "3\n>'======#======~\n>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~\n>'===#====~" ], "output": [ "A\nB\nNA" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <iostream> #include <string> using namespace std; int stateA,stateB; int anum; void inA(char arg){ //cout << stateA << endl; if(stateA == 0){ if(arg == '>'){ stateA = 1; } }else if(stateA == 1){ if(arg == '\''){ stateA = 2; }else{ stateA = -1; } }else if(stateA == 2){ if(arg == '='){...
p00139 Snakes
In a world, a mysterious snake made of only letters lives. Two types of snakes are currently identified, type A and type B, but there may be other types as well. For class A, after ">'" is followed by one or more "=", "#" comes, and after the same number of "=" as before, "~" (half-width tilde) finish. Class B ends w...
{ "input": [ "3\n>'======#======~\n>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~\n>'===#====~" ], "output": [ "A\nB\nNA" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i=0; i<n; i++) { string S; cin >> S; if (S.size()<4) { cout << "NA" << endl; continue; } if (S.substr(0, 2)==">'" && S[S.size()-1]=='~') { ...
p00139 Snakes
In a world, a mysterious snake made of only letters lives. Two types of snakes are currently identified, type A and type B, but there may be other types as well. For class A, after ">'" is followed by one or more "=", "#" comes, and after the same number of "=" as before, "~" (half-width tilde) finish. Class B ends w...
{ "input": [ "3\n>'======#======~\n>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~\n>'===#====~" ], "output": [ "A\nB\nNA" ] }
{ "input": [], "output": [] }
CORRECT
python3
import re for i in range(int(input())): s=input() if re.match(">'(=+)#(=+)~",s):print('A') elif re.match(">\^(Q=)+~~",s):print('B') else:print('NA')
p00139 Snakes
In a world, a mysterious snake made of only letters lives. Two types of snakes are currently identified, type A and type B, but there may be other types as well. For class A, after ">'" is followed by one or more "=", "#" comes, and after the same number of "=" as before, "~" (half-width tilde) finish. Class B ends w...
{ "input": [ "3\n>'======#======~\n>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~\n>'===#====~" ], "output": [ "A\nB\nNA" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0; i<(n); i++) #define REP2(i,x,n) for(int i=x; i<(n); i++) #define ALL(n) begin(n),end(n) struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; int check( string S ) { //A if( S[ 0 ] == '>' && S[ 1 ] == '\'' && S[ S.size() - 1 ...
p00139 Snakes
In a world, a mysterious snake made of only letters lives. Two types of snakes are currently identified, type A and type B, but there may be other types as well. For class A, after ">'" is followed by one or more "=", "#" comes, and after the same number of "=" as before, "~" (half-width tilde) finish. Class B ends w...
{ "input": [ "3\n>'======#======~\n>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~\n>'===#====~" ], "output": [ "A\nB\nNA" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#define _USE_MATH_DEFINES #include <iostream> #include <sstream> #include <cmath> #include <algorithm> #include <queue> #include <stack> #include <limits> #include <map> #include <string> #include <cstring> #include <set> #include <deque> using namespace std; typedef long long ll; typedef pair<double,int> P; static ...
p00139 Snakes
In a world, a mysterious snake made of only letters lives. Two types of snakes are currently identified, type A and type B, but there may be other types as well. For class A, after ">'" is followed by one or more "=", "#" comes, and after the same number of "=" as before, "~" (half-width tilde) finish. Class B ends w...
{ "input": [ "3\n>'======#======~\n>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~\n>'===#====~" ], "output": [ "A\nB\nNA" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include <stdio.h> #include <ctype.h> #include <string> #include <iostream> #include <vector> #include <stack> #include <fstream> #include <sstream> #include <queue> #include <exception> #include <cmath> #include <numeric> #include <map> #include <algorithm> #i...
p00139 Snakes
In a world, a mysterious snake made of only letters lives. Two types of snakes are currently identified, type A and type B, but there may be other types as well. For class A, after ">'" is followed by one or more "=", "#" comes, and after the same number of "=" as before, "~" (half-width tilde) finish. Class B ends w...
{ "input": [ "3\n>'======#======~\n>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~\n>'===#====~" ], "output": [ "A\nB\nNA" ] }
{ "input": [], "output": [] }
CORRECT
cpp
#include <iostream> #include <string> using namespace std; string repeat(int n, string s) { string res = ""; for (int i=0; i<n; ++i) res += s; return res; } int main() { int N; cin >> N; for (int i=0; i<N; ++i) { string snake; cin >> snake; int len = snake.size(); ...
p00139 Snakes
In a world, a mysterious snake made of only letters lives. Two types of snakes are currently identified, type A and type B, but there may be other types as well. For class A, after ">'" is followed by one or more "=", "#" comes, and after the same number of "=" as before, "~" (half-width tilde) finish. Class B ends w...
{ "input": [ "3\n>'======#======~\n>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~\n>'===#====~" ], "output": [ "A\nB\nNA" ] }
{ "input": [], "output": [] }
CORRECT
java
import java.util.Scanner; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static void main(String[] args) throws java.io.IOException { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); while (n != 0) { n--; char[] snake = sc.next().toCharArray(); Stri...