buggy_code
stringlengths 11
625k
| fixed_code
stringlengths 17
625k
| bug_type
stringlengths 2
4.45k
| language
int64 0
8
| token_count
int64 5
200k
| change_count
int64 0
100
|
|---|---|---|---|---|---|
#include <iostream>
using namespace std;
int main() {
int n, s = 100000;
cin >> n;
for (int i = 0; i < n; i++) {
s *= 0.05;
if (s % 1000 != 0) {
s /= 1000;
s *= 1000;
s += 1000;
}
}
cout << s << endl;
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
int n, s = 100000;
cin >> n;
for (int i = 0; i < n; i++) {
s *= 1.05;
if (s % 1000 != 0) {
s /= 1000;
s *= 1000;
s += 1000;
}
}
cout << s << endl;
cin >> n;
return 0;
}
|
[["-", 0, 7, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
| 1
| 74
| 6
|
#include <iostream>
using namespace std;
int main() {
int d = 100000;
int n;
cin >> n;
while (--n > 0) {
d *= 1.05;
if (d % 1000) {
d = (d / 1000 + 1) * 1000;
}
}
cout << d << endl;
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
int d = 100000;
int n;
cin >> n;
while (n-- > 0) {
d *= 1.05;
if (d % 1000) {
d = (d / 1000 + 1) * 1000;
}
}
cout << d << endl;
return 0;
}
|
[["-", 0, 52, 15, 339, 51, 16, 31, 27, 17, 68], ["+", 0, 52, 15, 339, 51, 16, 31, 27, 17, 68]]
| 1
| 66
| 2
|
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int n;
int a = 100000;
cin >> n;
for (int i = 0; i < n; i++) {
a *= 1.05;
if (a % 100 != 0) {
a = (a / 1000 + 1) * 1000;
}
}
cout << a << endl;
}
|
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int n;
int a = 100000;
cin >> n;
for (int i = 0; i < n; i++) {
a *= 1.05;
if (a % 1000 != 0) {
a = (a / 1000 + 1) * 1000;
}
}
cout << a << endl;
}
|
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
| 1
| 74
| 2
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
int sum = 100000;
cin >> n;
for (int i = 0; i < n; ++i) {
sum = sum + sum * 0.05;
if (sum % 10000 != 0) {
sum = sum / 10000;
sum = sum + 1;
sum = sum * 10000;
}
}
cout << sum << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
int sum = 100000;
cin >> n;
for (int i = 0; i < n; ++i) {
sum = sum + sum * 0.05;
if (sum % 1000 != 0) {
sum = sum / 1000;
sum = sum + 1;
sum = sum * 1000;
}
}
cout << sum << endl;
}
|
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
| 1
| 82
| 6
|
#include <iostream>
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;
}
}
|
#include <iostream>
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 + 999) / 1000 * 1000;
}
cout << cur << endl;
}
}
|
[["+", 0, 11, 12, 16, 31, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 11, 12, 16, 31, 16, 31, 23, 0, 25]]
| 1
| 64
| 4
|
#include <iostream>
using namespace std;
int main(void) {
int n;
double money = 100000;
int i;
cin >> n;
for (i = 0; i < n; i++) {
money *= 1.05;
money /= 1000;
money += 0.9;
money = (int)money;
money *= 1000;
}
cout << (int)money << endl;
return 0;
}
|
#include <iostream>
using namespace std;
int main(void) {
int n;
double money = 100000;
int i;
cin >> n;
for (i = 0; i < n; i++) {
money *= 1.05;
money /= 1000;
money += 0.999;
money = (int)money;
money *= 1000;
}
cout << (int)money << endl;
return 0;
}
|
[["-", 0, 7, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 12, 13]]
| 1
| 78
| 2
|
#include <iostream>
using namespace std;
int main() {
int n, M, m;
M = 100;
cin >> n;
for (int i = 0; i < n; i++) {
m = (M + 19) / 20;
M += m;
}
cout << M;
}
|
#include <iostream>
using namespace std;
int main() {
int n, M, m;
M = 100;
cin >> n;
for (int i = 0; i < n; i++) {
m = (M + 19) / 20;
M += m;
}
cout << M * 1000 << endl;
}
|
[["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 48], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
| 1
| 61
| 4
|
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int m = 100000, n;
cin >> n;
for (int i = 0; i < n; i++) {
m *= 1.05;
if (m % 100 != 0) {
m /= 1000;
m++;
m *= 1000;
}
}
cout << m << endl;
return 0;
}
|
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int main() {
unsigned long m = 100000, n;
cin >> n;
for (int i = 0; i < n; i++) {
m *= 1.05;
if (m % 1000 != 0) {
m /= 1000;
m++;
m *= 1000;
}
}
cout << m << endl;
return 0;
}
|
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 87], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
| 1
| 87
| 5
|
#include <iostream>
using namespace std;
double money = 100000;
int i;
int main() {
cin >> i;
for (i; i > 0; --i) {
money *= 1.05;
money = (long)(money / 1000 + 0.9) * 1000;
}
printf("%.0lf\n", money);
}
|
#include <iostream>
using namespace std;
double money = 100000;
int i;
int main() {
cin >> i;
for (i; i > 0; --i) {
money *= 1.05;
money = (long)(money / 1000 + 0.99) * 1000;
}
printf("%.0lf\n", money);
}
|
[["-", 12, 16, 31, 74, 51, 23, 0, 16, 12, 13], ["+", 12, 16, 31, 74, 51, 23, 0, 16, 12, 13]]
| 1
| 66
| 2
|
#include <iostream>
using namespace std;
int main() {
int n;
long long money = 100000;
cin >> n;
for (int i = 0; i < n; i++)
money += money * 0.05;
if ((money % 1000) != 0)
money = money - money % 1000 + 1000;
cout << money << endl;
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
int n;
long long money = 100000;
cin >> n;
for (int i = 0; i < n; i++) {
money *= 1.05;
if ((money % 1000) != 0)
money = money - money % 1000 + 1000;
}
cout << money << endl;
return 0;
}
|
[["-", 8, 9, 0, 7, 8, 1, 0, 11, 31, 22], ["-", 8, 9, 0, 7, 8, 1, 0, 11, 17, 107], ["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 45], ["-", 0, 7, 8, 1, 0, 11, 12, 16, 17, 48], ["-", 0, 7, 8, 1, 0, 11, 12, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 108], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]]
| 1
| 74
| 8
|
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
double m = 100000;
for (int i = 0; i < n; i++) {
m *= 1.05;
if ((int)m % 1000 != 0)
m = m - (int)m % 1000 + 1000;
}
cout << m << endl;
}
|
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int m = 100000;
for (int i = 0; i < n; i++) {
m *= 1.05;
if ((int)m % 1000 != 0)
m = m - (int)m % 1000 + 1000;
}
cout << m << endl;
}
|
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
| 1
| 74
| 2
|
#include <iostream>
using namespace std;
int main() {
int n;
while (cin >> n) {
int sum = 100000;
for (int i = 0; i < n; i++) {
sum *= 105 / 100.0;
if ((int)sum % 1000 >= 100) {
sum /= 1000;
sum *= 1000;
sum += 1000;
}
}
printf("%d\n", (int)sum);
}
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
int n;
while (cin >> n) {
int sum = 100000;
for (int i = 0; i < n; i++) {
sum *= 105 / 100.0;
if ((int)sum % 1000 >= 1) {
sum /= 1000;
sum *= 1000;
sum += 1000;
}
}
printf("%d\n", (int)sum);
}
return 0;
}
|
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
| 1
| 91
| 2
|
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int debt = 100000, n;
cin >> n;
for (; n > 0; n--) {
debt = debt * 1.05;
}
if ((debt % 10000) > 0) {
debt = debt - (debt % 10000);
debt += 10000;
}
cout << debt << endl;
return 0;
}
|
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int debt = 100000, n;
cin >> n;
for (; n > 0; n--) {
debt = debt * 1.05;
if ((debt % 1000) > 0) {
debt = debt - (debt % 1000);
debt += 1000;
}
}
cout << debt << endl;
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 15, 339, 51, 16, 31, 23, 0, 16, 12, 13], ["+", 15, 339, 51, 16, 31, 23, 0, 16, 12, 13], ["-", 0, 11, 12, 16, 12, 23, 0, 16, 12, 13], ["+", 0, 11, 12, 16, 12, 23, 0, 16, 12, 13], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]]
| 1
| 78
| 8
|
/*****include*****/
#include <fstream>
#include <iostream>
/*****デバッグ定義*****/
//#define DEBUG
/*****マクロ定義*****/
/*****名前空間*****/
using namespace std;
/*****グローバル変数置き場*****/
/*****その他関数置き場*****/
/*****main関数*****/
int main() {
/*****ファイルオープン*****/
#ifdef DEBUG
ofstream fout("output.txt");
ifstream fin("input.txt");
if (!fout || !fin) {
cout << "Can't open the file.\n";
return;
}
#endif
/*****変数置き場*****/
int year;
long int money = 100000;
/*****処理部*****/
cin >> year;
for (int i = 1; i <= year; i++) {
money += money * 0.05;
}
if (money % 1000 > 0) {
money /= 1000;
money++;
money *= 1000;
}
cout << money << endl;
/*****処理終了後*****/
#ifdef DEBUG
fout.close();
fin.close();
#endif
return 0;
}
|
/*****include*****/
#include <fstream>
#include <iostream>
/*****デバッグ定義*****/
//#define DEBUG
/*****マクロ定義*****/
/*****名前空間*****/
using namespace std;
/*****グローバル変数置き場*****/
/*****その他関数置き場*****/
/*****main関数*****/
int main() {
/*****ファイルオープン*****/
#ifdef DEBUG
ofstream fout("output.txt");
ifstream fin("input.txt");
if (!fout || !fin) {
cout << "Can't open the file.\n";
return;
}
#endif
/*****変数置き場*****/
int year;
long int money = 100000;
/*****処理部*****/
cin >> year;
for (int i = 1; i <= year; i++) {
money += money * 0.05;
if (money % 1000 > 0) {
money /= 1000;
money++;
money *= 1000;
}
}
cout << money << endl;
/*****処理終了後*****/
#ifdef DEBUG
fout.close();
fin.close();
#endif
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]]
| 1
| 144
| 2
|
#include <iostream>
using namespace std;
int main() {
int input, money = 100000;
cin >> input;
for (int i = 0; i < input; i++) {
money *= 1.05;
}
if (500 <= money % 1000)
money = money - money % 1000 + 1000;
cout << money << endl;
}
|
#include <iostream>
using namespace std;
int main() {
int input, money = 100000;
cin >> input;
for (int i = 0; i < input; i++) {
money *= 1.05;
if (0 < money % 1000)
money = money - money % 1000 + 1000;
}
cout << money << endl;
}
|
[["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 31, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 31, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]]
| 1
| 67
| 6
|
#include <cmath>
#include <iostream>
int main() {
int weeks, debt = 100000;
std::cin >> weeks;
for (int i = 0; i < weeks; i++) {
debt *= 1.05;
debt = ceil(debt / 1000.0) * 1000;
std::cout << debt << std::endl;
}
return 0;
}
|
#include <cmath>
#include <iostream>
int main() {
int weeks, debt = 100000;
std::cin >> weeks;
for (int i = 0; i < weeks; i++) {
debt *= 1.05;
debt = ceil(debt / 1000.0) * 1000;
}
std::cout << debt << std::endl;
return 0;
}
|
[["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]]
| 1
| 67
| 2
|
#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int week;
cin >> week;
double money = 100;
for (int i = 0; i < week; i++) {
money = money * 1.05;
money += 0.9;
money = int(money);
}
printf("%d\n", int(money) * 1000);
}
|
#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int week;
cin >> week;
double money = 100;
for (int i = 0; i < week; i++) {
money = money * 1.05;
money += 0.999;
money = int(money);
}
printf("%d\n", int(money) * 1000);
}
|
[["-", 0, 7, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 12, 13]]
| 1
| 76
| 2
|
import math
debt = 100
for i in range(int(input())):
ceil = math.ceil(debt*1.05)
print(debt*1000)
|
import math
debt = 100
for i in range(int(input())):
debt = math.ceil(debt*1.05)
print(debt*1000)
|
[["-", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22]]
| 5
| 34
| 2
|
n = 10 ** 2
for i in range(int(input())) :
n = float(n) * 1.05
if n - int(n) > 0 : n = int(n) + 1
else : n = int(n)
print(n * (10 ** 4))
|
n = 10 ** 2
for i in range(int(input())) :
n = float(n) * 1.05
if n - int(n) > 0 : n = int(n) + 1
else : n = int(n)
print(n * (10 ** 3))
|
[["-", 3, 4, 0, 657, 12, 23, 0, 657, 12, 612], ["+", 3, 4, 0, 657, 12, 23, 0, 657, 12, 612]]
| 5
| 62
| 2
|
import math
shuu = input()
num = int(shuu)
ganpon = 100000
i = 1
while i < num:
ganpon *= 1.05
ganpon /= 1000
ganpon = math.ceil(ganpon)
ganpon *= 1000
i += 1
pass
print(ganpon)
|
import math
shuu = input()
num = int(shuu)
ganpon = 100000
i = 1
while i <= num:
ganpon *= 1.05
ganpon /= 1000
ganpon = math.ceil(ganpon)
ganpon *= 1000
i += 1
pass
#ganpon /= 1000
#ganpon = math.ceil(ganpon)
#ganpon *= 100000
print(ganpon)
|
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 19]]
| 5
| 49
| 2
|
n = int(input())
result = 100000
for i in range(0,n):
result = result * 1.05
if result % 1000 == 0:
pass
else:
result = result-(result % 1000)+ 1000
result = result(int)
print(result)
|
n = int(input())
result = 100000
for i in range(0,n):
result = result * 1.05
if result % 1000 == 0:
pass
else:
result = result-(result % 1000)+ 1000
result = int(result)
print(result)
|
[["-", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22]]
| 5
| 57
| 4
|
import math
v = int(input())
cal = 100000
for w in range(5):
cal = math.ceil(cal * 1.05 * 0.001) * 1000
print("%d" % cal)
|
import math
v = int(input())
cal = 100000
for w in range(v):
cal = math.ceil(cal * 1.05 * 0.001) * 1000
print("%d" % cal)
|
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22]]
| 5
| 43
| 2
|
import sys
import math
n = int(input())
debt = 100000
for i in range(1,n+1):
debt = math.floor((debt*1.05)/1000)*1000
print(debt)
|
import sys
import math
n = int(input())
debt = 100000
for i in range(1,n+1):
debt = math.ceil((debt*1.05)/1000)*1000
print(debt)
|
[["-", 0, 662, 12, 657, 31, 652, 63, 319, 319, 22], ["+", 0, 662, 12, 657, 31, 652, 63, 319, 319, 22]]
| 5
| 47
| 2
|
import math
a = 100000
for n in range(int(input())):
a = math.ceil(a*105/100)
print(int(a))
|
import math
a = 100000
for n in range(int(input())):
a = math.ceil(a*105/100000)*1000
print(int(a))
|
[["-", 0, 662, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 12, 657, 31, 652, 3, 4, 0, 657, 12, 612], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 48], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 612]]
| 5
| 37
| 4
|
import math
n = int(input())
b = 100
for i in range(n):
b += b * 0.05
b = math.ceil(b)
print("%d" % b * 1000)
|
import math
n = int(input())
b = 100
for i in range(n):
b += b * 0.05
b = math.ceil(b)
b *= 1000
print("%d" % b)
|
[["+", 36, 36, 0, 656, 0, 1, 0, 677, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 677, 17, 108], ["+", 36, 36, 0, 656, 0, 1, 0, 677, 12, 612], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 48], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]]
| 5
| 44
| 5
|
import math
def int_ceil(src,range):
return int(math.ceil(src/float(range)) * range)
def main():
week = int(input())
debt = 100000
for i in range(week):
risi = debt * 0.05
debt = int_ceil(debt+ risi,1000)
print(math)
if __name__ == "__main__":
main()
|
import math
def int_ceil(src,range):
return int(math.ceil(src/float(range)) * range)
def main():
week = int(input())
debt = 100000
for i in range(week):
risi = debt * 0.05
debt = int_ceil(debt+ risi,1000)
print(debt)
if __name__ == "__main__":
main()
|
[["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22]]
| 5
| 80
| 2
|
a=100
for _ in[0]*int(input()):a=int(a*1.05)+(a%100>0)
print(a*1000)
|
a=100
for _ in[0]*int(input()):a=int(a*1.05)+(a%20>0)
print(a*1000)
|
[["-", 12, 657, 12, 23, 0, 666, 0, 657, 12, 612], ["+", 12, 657, 12, 23, 0, 666, 0, 657, 12, 612]]
| 5
| 39
| 2
|
import math
N = int(input())
A = 100000
for _ in range(N):
A = A * 1.05
A = (int(math.ceil(A / 10000))) * 10000
print(A)
|
import math
N = int(input())
A = 100000
for _ in range(N):
A = A * 1.05
A = (int(math.ceil(A / 1000))) * 1000
print(A)
|
[["-", 3, 4, 0, 652, 3, 4, 0, 657, 12, 612], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 12, 612], ["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 612]]
| 5
| 47
| 4
|
n = int(input())
ans = 100000
for i in range(n):
ans *= 1.05
if ans % 1000 > 0:
ans = ans // 10000 * 10000 + 10000
print(int(ans))
|
n = int(input())
ans = 100000
# ans += (n*(100000*0.05))
for i in range(n):
ans *= 1.05
if ans % 1000 > 0:
ans = ans // 1000 * 1000 + 1000
print(int(ans))
|
[["-", 0, 662, 12, 657, 31, 657, 31, 657, 12, 612], ["+", 0, 662, 12, 657, 31, 657, 31, 657, 12, 612], ["-", 0, 1, 0, 662, 12, 657, 31, 657, 12, 612], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 12, 612], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612]]
| 5
| 45
| 6
|
import math
r = 100
n = input()
for i in range(n):
r = math.ceil(r * 1.05)
print(r * 1000)
|
import math
r = 100
n = int(input())
for i in range(n):
r = math.ceil(r * 1.05)
print(r * 1000)
|
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
| 5
| 34
| 3
|
import math
n = eval(input())
m = 100000
for i in range(n):
m *= 1.05
print(m)
m = math.ceil(m/1000)*1000
print(int(m))
|
import math
n = eval(input())
m = 100000
for i in range(n):
m *= 1.05
m = math.ceil(m/1000)*1000
print(int(m))
|
[["-", 0, 7, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
| 5
| 47
| 4
|
package main
import "fmt"
func roundUp100(dept float64) float64 {
iDept := int(dept)
if iDept-(iDept/1000*1000) != 0 {
iDept = ((iDept / 1000) + 1) * 1000
}
return float64(iDept)
}
func main() {
var week int
fmt.Scan(&week)
dept := 100000.0
for i := 0; i < week; i++ {
dept *= 1.05
dept = roundUp100(dept)
}
fmt.Println(dept)
}
//問題文が理解できていない感
|
package main
import "fmt"
func roundUp1000(dept float64) float64 {
iDept := int(dept)
if iDept-(iDept/1000*1000) != 0 {
iDept = ((iDept / 1000) + 1) * 1000
}
return float64(iDept)
}
func main() {
var week int
fmt.Scan(&week)
dept := 100000.0
for i := 0; i < week; i++ {
dept *= 1.05
dept = roundUp1000(dept)
}
fmt.Println(int(dept))
}
|
[["-", 36, 36, 36, 36, 0, 434, 0, 435, 141, 22], ["+", 36, 36, 36, 36, 0, 434, 0, 435, 141, 22], ["-", 8, 196, 0, 436, 12, 432, 0, 2, 63, 22], ["+", 8, 196, 0, 436, 12, 432, 0, 2, 63, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 25]]
| 7
| 116
| 7
|
package main
import (
"bufio"
"os"
"strconv"
"math"
"fmt"
)
var scanner = bufio.NewScanner(os.Stdin)
func nextInt() int {
scanner.Scan()
i, e := strconv.Atoi(scanner.Text())
if e != nil {
panic(e)
}
return i
}
func calc(n int) float64 {
tmp := 100000.0
for i := 0; i < n; i++ {
tmp *= 1.05
tmp = ceil(tmp, -3)
}
return tmp
}
func ceil(f float64, places int) float64 {
shift := math.Pow(10, float64(places))
return math.Ceil(f*shift)/shift
}
func main() {
scanner.Split(bufio.ScanWords)
n := nextInt()
ans := calc(n)
fmt.Println(ans)
}
|
package main
import (
"bufio"
"os"
"strconv"
"math"
"fmt"
)
var scanner = bufio.NewScanner(os.Stdin)
func nextInt() int {
scanner.Scan()
i, e := strconv.Atoi(scanner.Text())
if e != nil {
panic(e)
}
return i
}
func calc(n int) float64 {
tmp := 100000.0
for i := 0; i < n; i++ {
tmp *= 1.05
tmp = ceil(tmp, -3)
}
return tmp
}
func ceil(f float64, places int) float64 {
shift := math.Pow(10, float64(places))
return math.Ceil(f*shift)/shift
}
func main() {
scanner.Split(bufio.ScanWords)
n := nextInt()
ans := calc(n)
fmt.Println(int(ans))
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 25]]
| 7
| 203
| 3
|
require("fs")
.readFileSync("/dev/stdin", "utf8")
.trim()
.split('\n')
.map(function(i) {
p = 0;
for (a = 9; a--;)
for (b = 9; b--;)
for (c = 9; c--;)
for (d = 9; d--;)
i - a - b - c - d ? 0 : p++;
console.log(p)
})
|
require("fs")
.readFileSync("/dev/stdin", "utf8")
.trim()
.split('\n')
.map(function(i) {
p = 0;
for (a = 10; a--;)
for (b = 10; b--;)
for (c = 10; c--;)
for (d = 10; d--;)
i - a - b - c - d ? 0 : p++;
console.log(p)
})
|
[["-", 8, 556, 0, 7, 10, 1, 0, 11, 12, 555], ["+", 8, 556, 0, 7, 10, 1, 0, 11, 12, 555], ["-", 0, 7, 8, 7, 10, 1, 0, 11, 12, 555], ["+", 0, 7, 8, 7, 10, 1, 0, 11, 12, 555], ["-", 8, 7, 8, 7, 10, 1, 0, 11, 12, 555], ["+", 8, 7, 8, 7, 10, 1, 0, 11, 12, 555]]
| 2
| 103
| 8
|
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader reader =
new BufferedReader(new InputStreamReader(System.in));
// Scanner reader=new Scanner(System.in);
String s;
while ((s = reader.readLine()) == null) {
int in = Integer.parseInt(s);
// int in;
// while((in=reader.nextInt())!=EOF){
int co = 0;
for (int i = 0; i < 10; i++)
for (int j = 0; j < 10; j++)
for (int k = 0; k < 10; k++)
if (in - i - j - k >= 0 && in - i - j - k < 10)
co++;
System.out.println(co);
}
}
}
|
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader reader =
new BufferedReader(new InputStreamReader(System.in));
// Scanner reader=new Scanner(System.in);
String s;
while ((s = reader.readLine()) != null) {
int in = Integer.parseInt(s);
// int in;
// while((in=reader.nextInt())!=EOF){
int co = 0;
for (int i = 0; i < 10; i++)
for (int j = 0; j < 10; j++)
for (int k = 0; k < 10; k++)
if (in - i - j - k >= 0 && in - i - j - k < 10)
co++;
System.out.println(co);
}
}
}
|
[["-", 8, 196, 0, 52, 15, 15, 0, 16, 17, 60], ["+", 8, 196, 0, 52, 15, 15, 0, 16, 17, 79]]
| 3
| 161
| 2
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args)
throws NumberFormatException, IOException {
BufferedReader reader =
new BufferedReader(new InputStreamReader(System.in));
String s;
while ((s = reader.readLine()) != null) {
int count = 0;
int a = Integer.parseInt(s);
for (int i = 1; i < 10; i++)
for (int j = 1; j < 10; j++)
for (int k = 1; k < 10; k++)
for (int l = 1; l < 10; l++)
if (i + j + k + l == a)
count++;
System.out.println(count);
}
}
}
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args)
throws NumberFormatException, IOException {
BufferedReader reader =
new BufferedReader(new InputStreamReader(System.in));
String s;
while ((s = reader.readLine()) != null) {
int count = 0;
int a = Integer.parseInt(s);
for (int i = 0; i < 10; i++)
for (int j = 0; j < 10; j++)
for (int k = 0; k < 10; k++)
for (int l = 0; l < 10; l++)
if (i + j + k + l == a)
count++;
System.out.println(count);
}
}
}
|
[["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["-", 0, 7, 8, 7, 502, 503, 49, 200, 51, 499], ["+", 0, 7, 8, 7, 502, 503, 49, 200, 51, 499], ["-", 8, 7, 8, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 7, 8, 7, 502, 503, 49, 200, 51, 499]]
| 3
| 171
| 8
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Main {
static InputReader in;
static PrintWriter out;
static class Solution {
void solve() throws IOException {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int n = in.nextInt();
int cnt = 0;
for (int i = 0; i <= 9; i++) {
for (int j = 0; j <= 9; j++) {
for (int k = 0; k <= 9; k++) {
for (int l = 0; l <= 9; l++) {
if (i + j + k + l == n) {
cnt++;
}
}
}
}
}
out.println(cnt);
}
// End solve()
}
// End Solution
}
public static void main(String[] args) throws IOException {
in = new InputReader(System.in);
out = new PrintWriter(System.out);
Solution solver = new Solution();
solver.solve();
out.close();
}
static class InputReader {
public BufferedReader br;
public StringTokenizer st;
public InputReader(InputStream stream) {
br = new BufferedReader(new InputStreamReader(stream));
}
public int nextInt() throws IOException {
while (st == null || !st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine());
}
return Integer.parseInt(st.nextToken());
}
public long nextLong() throws IOException {
while (st == null || !st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine());
}
return Long.parseLong(st.nextToken());
}
public String next() throws IOException {
while (st == null || !st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine());
}
return st.nextToken();
}
public double nextDouble() throws IOException {
while (st == null || !st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine());
}
return Double.parseDouble(st.nextToken());
}
}
}
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Main {
static InputReader in;
static PrintWriter out;
static class Solution {
void solve() throws IOException {
Scanner sc = new Scanner(System.in);
while (sc.hasNextInt()) {
int n = sc.nextInt();
int cnt = 0;
for (int i = 0; i <= 9; i++) {
for (int j = 0; j <= 9; j++) {
for (int k = 0; k <= 9; k++) {
for (int l = 0; l <= 9; l++) {
if (i + j + k + l == n) {
cnt++;
}
}
}
}
}
out.println(cnt);
}
// End solve()
}
// End Solution
}
public static void main(String[] args) throws IOException {
in = new InputReader(System.in);
out = new PrintWriter(System.out);
Solution solver = new Solution();
solver.solve();
out.close();
}
static class InputReader {
public BufferedReader br;
public StringTokenizer st;
public InputReader(InputStream stream) {
br = new BufferedReader(new InputStreamReader(stream));
}
public int nextInt() throws IOException {
while (st == null || !st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine());
}
return Integer.parseInt(st.nextToken());
}
public long nextLong() throws IOException {
while (st == null || !st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine());
}
return Long.parseLong(st.nextToken());
}
public String next() throws IOException {
while (st == null || !st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine());
}
return st.nextToken();
}
public double nextDouble() throws IOException {
while (st == null || !st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine());
}
return Double.parseDouble(st.nextToken());
}
}
}
|
[["-", 8, 196, 0, 52, 15, 15, 0, 492, 141, 22], ["+", 8, 196, 0, 52, 15, 15, 0, 492, 141, 22], ["-", 8, 196, 0, 503, 49, 200, 51, 492, 500, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 500, 22]]
| 3
| 474
| 4
|
$stdin.gets.chomp.chars.inject([]) { |l, c| l.unshift(c) }.join
|
puts $stdin.gets.chomp.chars.inject([]) { |l, c| l.unshift(c) }.join
|
[["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22]]
| 4
| 28
| 1
|
str = gets.chomp.to_s
p str.reverse
|
str = gets.chomp.to_s
puts str.reverse
|
[["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22]]
| 4
| 11
| 2
|
inputTxt = $stdin.gets.chomp
p inputTxt.reverse!
|
inputTxt = $stdin.gets.chomp
puts inputTxt.reverse!
|
[["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22]]
| 4
| 11
| 2
|
def ReverseChar(str)
str_arr = []
rev_str_arr = []
str.each_char do |char|
str_arr << char
end
rev_str_arr = str_arr.reverse
rev_str_arr.join
end
while str = gets.chomp
p ReverseChar(str)
end
|
def ReverseChar(str)
str_arr = []
rev_str_arr = []
str.each_char do |char|
str_arr << char
end
rev_str_arr = str_arr.reverse
rev_str_arr.join
end
str = gets.chomp
puts ReverseChar(str)
|
[["-", 36, 36, 36, 36, 0, 493, 0, 89, 0, 89], ["-", 0, 493, 0, 89, 8, 170, 0, 652, 735, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["-", 36, 36, 0, 493, 0, 89, 8, 170, 0, 444]]
| 4
| 45
| 4
|
gets.chomp.split('').reverse.join
|
puts gets.chomp.split('').reverse.join
|
[["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22]]
| 4
| 13
| 1
|
print(input()[-1])
|
print(input()[::-1])
|
[["+", 0, 652, 3, 4, 0, 206, 206, 663, 0, 102]]
| 5
| 10
| 2
|
line = input()
print(''.join(reversed(list(input()))))
|
line = input()
print(''.join(reversed(list(line))))
|
[["-", 3, 4, 0, 652, 3, 4, 0, 652, 63, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22]]
| 5
| 23
| 4
|
# -*-coding:utf-8
#????????????????????§??¨???
def main():
line = eval(input())
print((line[::-1]))
if __name__ == '__main__':
main()
|
# -*-coding:utf-8
#????????????????????§??¨???
def main():
line = input()
print(line[::-1])
if __name__ == '__main__':
main()
|
[["-", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["-", 0, 1, 0, 652, 3, 4, 0, 23, 0, 24], ["-", 0, 1, 0, 652, 3, 4, 0, 23, 0, 25]]
| 5
| 37
| 5
|
string = input("input data")
size = len(string)
st = []
for i in range(size):
st.append(string[size-i-1])
print(''.join(st))
|
string = input()
size = len(string)
st = []
for i in range(size):
st.append(string[size-i-1])
print(''.join(st))
|
[["-", 0, 662, 12, 652, 3, 4, 0, 557, 0, 654], ["-", 0, 662, 12, 652, 3, 4, 0, 557, 0, 6], ["-", 0, 662, 12, 652, 3, 4, 0, 557, 0, 655]]
| 5
| 49
| 3
|
#include <cmath>
#include <iostream>
using namespace std;
int main() {
int n, i;
double debt = 100000;
cin >> n;
for (i = 0; i < n; i++) {
debt = debt * 1.05;
debt /= 1000;
debt = ceil(debt);
debt *= 1000;
}
cout << debt << endl;
return 0;
}
|
#include <cmath>
#include <iostream>
using namespace std;
int main() {
int n, i;
double debt = 100000;
cin >> n;
for (i = 0; i < n; i++) {
debt = debt * 1.05;
debt /= 1000;
debt = ceil(debt);
debt *= 1000;
}
cout << (int)debt << endl;
return 0;
}
|
[["+", 0, 1, 0, 16, 31, 16, 12, 74, 0, 24], ["+", 0, 16, 31, 16, 12, 74, 39, 77, 39, 40], ["+", 0, 1, 0, 16, 31, 16, 12, 74, 0, 25]]
| 1
| 73
| 3
|
#include <iostream>
using namespace std;
int main() {
int n, money = 100000;
double debt;
cin >> n;
for (int i = 0; i < n; i++) {
debt = money * 1.05;
money = debt;
if ((money % 1000) != 0)
money = money + 1000;
}
cout << money << endl;
}
|
#include <iostream>
using namespace std;
int main() {
int n, money = 100000;
double debt;
cin >> n;
for (int i = 0; i < n; i++) {
debt = money * 1.05;
money = debt;
if ((money % 1000) != 0)
money = money - (money % 1000) + 1000;
}
cout << money << endl;
}
|
[["+", 64, 1, 0, 11, 12, 16, 31, 16, 17, 33], ["+", 0, 11, 12, 16, 31, 16, 12, 23, 0, 24], ["+", 12, 16, 31, 16, 12, 23, 0, 16, 31, 22], ["+", 12, 16, 31, 16, 12, 23, 0, 16, 17, 109], ["+", 12, 16, 31, 16, 12, 23, 0, 16, 12, 13], ["+", 0, 11, 12, 16, 31, 16, 12, 23, 0, 25]]
| 1
| 74
| 6
|
#include <iostream>
using namespace std;
int main() {
double debt = 100000.0;
int n, r;
cin >> n;
while (n-- > 0) {
debt *= 1.05;
r = (int)debt % 1000;
if (r != 0) {
debt = debt - r + 1000;
}
}
cout << debt << endl;
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
int debt = 100000.0;
int n, r;
cin >> n;
while (n-- > 0) {
debt *= 1.05;
r = debt % 1000;
if (r != 0) {
debt = debt - r + 1000;
}
}
cout << debt << endl;
return 0;
}
|
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 1, 0, 11, 12, 16, 31, 74, 0, 24], ["-", 0, 11, 12, 16, 31, 74, 39, 77, 39, 40], ["-", 0, 1, 0, 11, 12, 16, 31, 74, 0, 25]]
| 1
| 73
| 3
|
#include <iostream>
using namespace std;
int main() {
double debt = 100000.0;
int n, r;
cin >> n;
while (n-- > 0) {
debt *= 1.05;
r = (int)debt % 1000;
if (r != 0) {
debt = debt - r + 1000;
}
}
cout << debt << endl;
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
double debt = 100000.0;
int n, r;
cin >> n;
while (n-- > 0) {
debt *= 1.05;
r = (int)debt % 1000;
if (r != 0) {
debt = debt - r + 1000;
}
}
cout << (int)debt << endl;
return 0;
}
|
[["+", 0, 1, 0, 16, 31, 16, 12, 74, 0, 24], ["+", 0, 16, 31, 16, 12, 74, 39, 77, 39, 40], ["+", 0, 1, 0, 16, 31, 16, 12, 74, 0, 25]]
| 1
| 73
| 3
|
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
double ans = 100;
for (int i = 0; i < n; i++) {
ans = ceil(ans * 1.05);
}
cout << (int)(100 * ans) << endl;
return 0;
}
|
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
double ans = 100;
for (int i = 0; i < n; i++) {
ans = ceil(ans * 1.05);
}
cout << (int)(1000 * ans) << endl;
return 0;
}
|
[["-", 31, 16, 12, 74, 51, 23, 0, 16, 31, 13], ["+", 31, 16, 12, 74, 51, 23, 0, 16, 31, 13]]
| 1
| 71
| 2
|
#include <iostream>
#include <string>
using namespace std;
int main(void) {
int money = 100000;
int n;
cin >> n;
for (int i = 0; i <= n; i++) {
money *= 1.05;
if (money % 1000 != 0) {
money += 1000;
}
money -= money % 1000;
}
cout << money << endl;
return 0;
}
|
#include <iostream>
#include <string>
using namespace std;
int main(void) {
int money = 100000;
int n;
cin >> n;
for (int i = 0; i < n; i++) {
money *= 1.05;
if (money % 1000 != 0) {
money += 1000;
money -= money % 1000;
}
}
cout << money << endl;
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]]
| 1
| 76
| 4
|
#include <stdio.h>
int main(void) {
int n;
scanf("%d", &n);
int coin = 100000;
for (int m = 0; m < n; m++) {
coin *= 1.05;
coin = (coin / 1000) * 1000 + (coin % 1000) > 0 ? 1000 : 0;
}
printf("%d\n", coin);
return 0;
}
|
#include <stdio.h>
int main(void) {
int n;
scanf("%d", &n);
int coin = 100000;
for (int m = 0; m < n; m++) {
coin *= 1.05;
coin = (coin / 1000) * 1000 + ((coin % 1000) > 0 ? 1000 : 0);
}
printf("%d\n", coin);
return 0;
}
|
[["+", 12, 23, 0, 41, 15, 16, 31, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 12, 23, 0, 25]]
| 1
| 82
| 2
|
#include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, amount = 100;
cin >> n;
for (int i = 0; i < n; i++) {
amount += amount * 0.05 + 0.999;
}
cout << amount * 100 << endl;
}
|
#include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, amount = 100;
cin >> n;
for (int i = 0; i < n; i++) {
amount = amount * 1.05 + 0.999;
}
cout << amount * 1000 << endl;
}
|
[["-", 0, 7, 8, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
| 1
| 67
| 6
|
#include <iostream>
int main() {
int week;
std::cin >> week;
int debt = 100000;
for (int cnt = 0; cnt < week; ++cnt) {
debt *= 1.05;
}
if (debt % 10000 != 0) {
debt += (10000 - (debt % 10000));
}
std::cout << debt << std::endl;
}
|
#include <iostream>
int main() {
int week;
std::cin >> week;
int debt = 100000;
for (int cnt = 0; cnt < week; ++cnt) {
debt *= 1.05;
if (debt % 1000 != 0) {
debt += (1000 - (debt % 1000));
}
}
std::cout << debt << std::endl;
}
|
[["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 0, 1, 0, 11, 12, 23, 0, 16, 31, 13], ["+", 0, 1, 0, 11, 12, 23, 0, 16, 31, 13], ["-", 12, 23, 0, 16, 12, 23, 0, 16, 12, 13], ["+", 12, 23, 0, 16, 12, 23, 0, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]]
| 1
| 74
| 8
|
#include <iostream>
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;
}
|
#include <iostream>
using namespace std;
int main() {
int 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;
}
|
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
| 1
| 73
| 2
|
#include <algorithm>
#include <climits>
#include <cmath>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <vector>
#define REP(i, p, n) for (int i = p; i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define rep_split(tok, a_str, re) \
for (char *tok = strtok((char *)a_str.c_str(), re); tok != NULL; \
tok = strtok(NULL, re))
#define all(c) (c).begin(), (c).end()
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;
rep(i, N) {
money = money * 1.05;
money = (int)ceil(money / 1000) * 1000;
}
cout << money << endl;
return 0;
}
|
#include <algorithm>
#include <climits>
#include <cmath>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <vector>
#define REP(i, p, n) for (int i = p; i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define rep_split(tok, a_str, re) \
for (char *tok = strtok((char *)a_str.c_str(), re); tok != NULL; \
tok = strtok(NULL, re))
#define all(c) (c).begin(), (c).end()
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;
rep(i, N) {
money = money * 1.05;
money = ceil(money / 1000) * 1000;
}
cout << (int)money << endl;
return 0;
}
|
[["-", 0, 1, 0, 11, 12, 16, 31, 74, 0, 24], ["-", 0, 11, 12, 16, 31, 74, 39, 77, 39, 40], ["-", 0, 1, 0, 11, 12, 16, 31, 74, 0, 25], ["+", 0, 1, 0, 16, 31, 16, 12, 74, 0, 24], ["+", 0, 16, 31, 16, 12, 74, 39, 77, 39, 40], ["+", 0, 1, 0, 16, 31, 16, 12, 74, 0, 25]]
| 1
| 172
| 6
|
#include <cmath>
#include <iostream>
using namespace std;
int roundUp(int x, int index);
int main(void) {
int i;
int n;
double intrst;
int debt;
cin >> n;
debt = 100000;
intrst = 0.05;
for (i = 0; i < n; i++) {
debt *= 1.0 + intrst;
debt = roundUp(debt, 4);
}
cout << debt << endl;
return 0;
}
int roundUp(int x, int index) {
int exp10;
exp10 = pow(10, index - 1);
x += exp10 - exp10 / 10;
x /= exp10;
x *= exp10;
return x;
}
|
#include <cmath>
#include <iostream>
using namespace std;
int roundUp(int x, int index);
int main(void) {
int i;
int n;
double intrst;
int debt;
cin >> n;
debt = 100000;
intrst = 0.05;
for (i = 0; i < n; i++) {
debt *= 1.0 + intrst;
debt = roundUp(debt, 4);
}
cout << debt << endl;
return 0;
}
int roundUp(int x, int index) {
int exp10;
exp10 = pow(10, index - 1);
x += exp10 - 1;
x /= exp10;
x *= exp10;
return x;
}
|
[["-", 0, 1, 0, 11, 12, 16, 12, 16, 31, 22], ["-", 0, 1, 0, 11, 12, 16, 12, 16, 17, 85], ["-", 0, 1, 0, 11, 12, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
| 1
| 132
| 22
|
n = gets.chomp.to_i
dt = 100_000
n.times do
dt *= 1.05
dt = dt.ceil(-3) if (money % 1000).positive?
end
puts dt
|
n = gets.chomp.to_i
dt = 100_000
n.times do
dt *= 1.05
dt = dt.ceil(-3) if (dt % 1000).positive?
end
puts dt
|
[["-", 0, 751, 15, 652, 486, 739, 0, 738, 31, 22], ["+", 0, 751, 15, 652, 486, 739, 0, 738, 31, 22]]
| 4
| 37
| 2
|
def week(n)
(n * 1.05 / 1000).ceil * 1000
end
n = gets.chomp.to_i
m = 100_000
n.times do
m = week(m)
puts m
end
puts m
|
def week(n)
(n * 1.05 / 1000).ceil * 1000
end
n = gets.chomp.to_i
m = 100_000
n.times do
m = week(m)
end
puts m
|
[["-", 0, 652, 196, 737, 8, 736, 0, 652, 735, 22], ["-", 196, 737, 8, 736, 0, 652, 3, 4, 0, 22]]
| 4
| 42
| 2
|
week = gets
bet = 100_000
(1..week.to_i).each do |_i|
bet *= 1.05
bet = (bet * 0.001).ceil * 1000
puts bet
end
|
week = gets
bet = 100_000
(1..week.to_i).each do |_i|
bet *= 1.05
bet = (bet * 0.001).ceil * 1000
end
puts bet
|
[["+", 36, 36, 0, 493, 0, 652, 196, 737, 0, 444], ["-", 36, 36, 0, 493, 0, 652, 196, 737, 0, 444]]
| 4
| 36
| 2
|
d = 1e5
gets.to_i.times do
d = (d + d / 20 + 999) / 1000 * 1000
end
p d
|
d = 10**5
gets.to_i.times do
d = (d + d / 20 + 999) / 1000 * 1000
end
p d
|
[["-", 36, 36, 36, 36, 0, 493, 0, 662, 12, 531], ["+", 36, 36, 0, 493, 0, 662, 12, 738, 31, 612], ["+", 36, 36, 0, 493, 0, 662, 12, 738, 17, 578], ["+", 36, 36, 0, 493, 0, 662, 12, 738, 12, 612]]
| 4
| 27
| 4
|
$stdin.gets.chomp.to_i.times.inject(100_000) { |a, _e| (a * 1.05 / 1_000).ceil * 1_000 }
|
puts $stdin.gets.chomp.to_i.times.inject(100_000) { |a, _e| (a * 1.05 / 1_000).ceil * 1_000 }
|
[["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22]]
| 4
| 32
| 1
|
n = gets.to_i
base = 100_000
n.times do
base *= 1.05
base = base.to_i
p base
c = base.to_s
loop do
if c.length <= 3
base = (base - c.to_i + 1000) if c.to_i != 0
break
end
c.slice!(0)
end
end
puts base
|
n = gets.to_i
base = 100_000
n.times do
base *= 1.05
base = base.to_i
c = base.to_s
loop do
if c.length <= 3
base = (base - c.to_i + 1000) if c.to_i != 0
break
end
c.slice!(0)
end
end
puts base
|
[["-", 0, 652, 196, 737, 8, 736, 0, 652, 735, 22], ["-", 196, 737, 8, 736, 0, 652, 3, 4, 0, 22]]
| 4
| 64
| 2
|
debt = 100_000
5.to_i.times { debt = (debt.to_f * 1.05 / 1000).ceil * 1000 }
puts debt
|
debt = 100_000
gets.to_i.times { debt = (debt.to_f * 1.05 / 1000).ceil * 1000 }
puts debt
|
[["-", 36, 36, 0, 493, 0, 652, 486, 652, 486, 612], ["+", 36, 36, 0, 493, 0, 652, 486, 652, 486, 22]]
| 4
| 27
| 2
|
debt = 100
gets.to_i.times do
debt = ceil(debt * 1.05)
end
puts debt * 1000
|
debt = 100
gets.to_i.times do
debt = (debt * 1.05).ceil
end
puts debt * 1000
|
[["-", 196, 737, 8, 736, 0, 662, 12, 652, 735, 22], ["+", 196, 737, 8, 736, 0, 662, 12, 652, 17, 131], ["+", 196, 737, 8, 736, 0, 662, 12, 652, 735, 22]]
| 4
| 22
| 3
|
money = 100_000
week = gets.chomp.to_i
week.times do |_n|
money *= 1.05
money = (money / 1000) * 1000 + 1000 if (money % 1000).positive?
end
puts money
|
money = 100_000
week = gets.chomp.to_i
week.times do |_n|
money *= 1.05
money = (money.to_i / 1000) * 1000 + 1000 if (money % 1000).positive?
end
puts money
|
[["+", 31, 738, 31, 739, 0, 738, 31, 652, 17, 131], ["+", 31, 738, 31, 739, 0, 738, 31, 652, 735, 22]]
| 4
| 42
| 2
|
n = gets.to_i
m = 100_000
n.times do
m = (m * 1.05).ceil
end
puts m
|
n = gets.to_i
m = 100_000
n.times do
m = (m * 1.05 / 1000).ceil * 1000
end
puts m
|
[["+", 12, 738, 31, 652, 486, 739, 0, 738, 17, 85], ["+", 12, 738, 31, 652, 486, 739, 0, 738, 12, 612], ["+", 196, 737, 8, 736, 0, 662, 12, 738, 17, 48], ["+", 196, 737, 8, 736, 0, 662, 12, 738, 12, 612]]
| 4
| 24
| 4
|
#! /usr/bin/python3
m=100
for _ in range(int(input())):
m = int(m*1.05+0.9)
print(m*1000)
|
#! /usr/bin/python3
m=100
for _ in range(int(input())):
m = int(m*1.05+0.999)
print(m*1000)
|
[["-", 0, 662, 12, 652, 3, 4, 0, 657, 12, 531], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 12, 531]]
| 5
| 33
| 2
|
# -*- coding: utf-8 -*-
from math import ceil
n = int(input())
d = int(1e5)
for x in range(n):
d = (1.05*d)
d + int(int(ceil(d/1e3))*1e3)
print (d)
|
# -*- coding: utf-8 -*-
from math import ceil
n=int(input())
d=int(1e5)
for x in range(n):
d=(1.05*d)
d=int(int(ceil(d/1e3))*1e3)
print(d)
|
[["-", 0, 7, 8, 196, 0, 1, 0, 657, 17, 72], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32]]
| 5
| 54
| 2
|
import math
def Interest(money,n):
for i in range(n):
money *= 1.05
money = math.ceil(money)
return money
m = 100
n = eval(input())
print(n)
print(int(Interest(m,n)*1000))
|
import math
def Interest(money,n):
for i in range(n):
money *= 1.05
money = math.ceil(money)
return money
m = 100
n = int(eval(input()))
print(int(Interest(m,n)*1000))
|
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]]
| 5
| 60
| 5
|
import math
n = eval(input())
money = 100
for i in range(n):
money *= 1.05
m = math.ceil(money)
print("%i"%(money*1000))
|
import math
n = eval(input())
money = 100
for i in range(n):
money *= 1.05
money = math.ceil(money)
print("%i"%(money*1000))
|
[["-", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22]]
| 5
| 44
| 2
|
a=int(input())
for i in range(5):
a*=1.05
if a%1000==0:
pass
else:
a=(a+1000)-a%1000
print(int(a))
|
a=100000
j=int(input())
for i in range(j):
a*=1.05
if a%1000==0:
pass
else:
a=(a+1000)-a%1000
print(int(a))
|
[["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22]]
| 5
| 47
| 5
|
ans = 100000
n = int(input())
for i in range(n):
ans *= 1.05
ans = ((ans+999)/1000)*1000;
print(ans)
|
ans = 100000
n = int(input())
for i in range(n):
ans *= 1.05
ans = int((ans+999)/1000)*1000;
print(ans)
|
[["+", 0, 1, 0, 662, 12, 657, 31, 652, 63, 22]]
| 5
| 40
| 1
|
import math
n = eval(input())
yen = 100000
for i in range(5):
yen += yen * 0.05
yen = int(math.ceil(yen / 1000.0) * 1000)
print(yen)
|
import math
n = eval(input())
yen = 100000
for i in range(n):
yen += yen * 0.05
yen = int(math.ceil(yen / 1000.0) * 1000)
print(yen)
|
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22]]
| 5
| 45
| 2
|
n=eval(input())
m = 100000
for _ in range(5):
m = m + m*0.05
if m % 1000:
m = m + 1000 - m % 1000
print(int(m))
|
n=eval(input())
m = 100000
for _ in range(n):
m = m + m*0.05
if m % 1000:
m = m + 1000 - m % 1000
print(int(m))
|
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22]]
| 5
| 47
| 2
|
import math
n = int(input())
debt = 100000
for i in range(n):
debt = int(math.ceil((debt * 1.05 / 1000) * 1000))
print(debt)
|
import math
n = int(input())
debt = 100000
for i in range(n):
debt = int(math.ceil(debt * 1.05 / 1000)) * 1000
print(debt)
|
[["-", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 31, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]]
| 5
| 44
| 4
|
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try {
String line = br.readLine();
while (line != null) {
int x = Integer.parseInt(line);
int a = 0, b = 0, c = 0, d = 0, i = 0, count = 0;
while (i <= 10000) {
if (a == 10) {
a = 0;
b++;
}
if (b == 10) {
b = 0;
c++;
}
if (c == 10) {
c = 0;
d++;
}
if (a + b + c + d == x) {
count++;
}
a++;
i++;
}
System.out.println(count);
line = br.readLine();
}
} catch (Exception e) {
System.out.println(e);
}
}
}
|
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try {
String line = br.readLine();
while (line != null) {
int x = Integer.parseInt(line);
int a = 0, b = 0, c = 0, d = 0, i = 0, count = 0;
while (i < 10000) {
if (a == 10) {
a = 0;
b++;
}
if (b == 10) {
b = 0;
c++;
}
if (c == 10) {
c = 0;
d++;
}
if (a + b + c + d == x) {
count++;
}
a++;
i++;
}
System.out.println(count);
line = br.readLine();
}
} catch (Exception e) {
System.out.println(e);
}
}
}
|
[["-", 8, 196, 0, 52, 15, 15, 0, 16, 17, 19], ["+", 8, 196, 0, 52, 15, 15, 0, 16, 17, 18]]
| 3
| 212
| 2
|
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 bl = "";
while ((bl = br.readLine()) != null) {
int n = Integer.parseInt(bl);
int counter = 0;
for (int a = 1; a < 10; a++) {
for (int b = 1; b < 10; b++) {
for (int c = 1; c < 10; c++) {
for (int d = 1; d < 10; d++) {
if ((a + b + c + d) == n) {
counter++;
}
}
}
}
}
System.out.println(counter);
}
}
}
|
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 bl = "";
while ((bl = br.readLine()) != null) {
int n = Integer.parseInt(bl);
int counter = 0;
for (int a = 0; a < 10; a++) {
for (int b = 0; b < 10; b++) {
for (int c = 0; c < 10; c++) {
for (int d = 0; d < 10; d++) {
if ((a + b + c + d) == n) {
counter++;
}
}
}
}
}
System.out.println(counter);
}
}
}
|
[["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499]]
| 3
| 184
| 8
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int tem = 0;
while (sc.hasNext()) {
int n = sc.nextInt();
for (int i = 9; i >= 0; i--) {
for (int j = 9; j >= 0; j--) {
for (int k = 9; k >= 0; k--) {
for (int l = 9; l >= 0; l--) {
if (i + j + k + l == n)
tem += 1;
}
}
}
}
System.out.printf("%d\n", tem);
}
}
}
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int tem = 0;
while (sc.hasNext()) {
int n = sc.nextInt();
for (int i = 9; i >= 0; i--) {
for (int j = 9; j >= 0; j--) {
for (int k = 9; k >= 0; k--) {
for (int l = 9; l >= 0; l--) {
if (i + j + k + l == n)
tem += 1;
}
}
}
}
System.out.printf("%d\n", tem);
tem = 0;
}
}
}
|
[["+", 0, 52, 8, 196, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 196, 0, 1, 0, 11, 12, 499], ["+", 8, 196, 0, 52, 8, 196, 0, 1, 0, 35]]
| 3
| 153
| 4
|
import java.util.Scanner;
public class Main {
Scanner in = new Scanner(System.in);
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (in.hasNext()) {
final int val = 36 - Math.abs(36 - in.nextInt());
int count = 0;
if (val <= 36 / 2) {
for (int a = 0; a < 10; a++) {
if (val >= a) {
for (int b = 0; b < 10; b++) {
int ab = a + b;
if (val >= ab) {
for (int c = 0; c < 10; c++) {
int abc = ab + c;
if (val >= abc) {
for (int d = 0; d < 10; d++) {
if ((abc + d) == val) {
count++;
}
}
}
}
}
}
}
}
}
System.out.println(count);
}
}
}
|
import java.util.Scanner;
public class Main {
Scanner in = new Scanner(System.in);
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (in.hasNext()) {
final int val = 18 - Math.abs(18 - in.nextInt());
int count = 0;
if (val <= 36 / 2) {
for (int a = 0; a < 10; a++) {
if (val >= a) {
for (int b = 0; b < 10; b++) {
int ab = a + b;
if (val >= ab) {
for (int c = 0; c < 10; c++) {
int abc = ab + c;
if (val >= abc) {
for (int d = 0; d < 10; d++) {
if ((abc + d) == val) {
count++;
}
}
}
}
}
}
}
}
}
System.out.println(count);
}
}
}
|
[["-", 8, 196, 0, 503, 49, 200, 51, 16, 31, 499], ["+", 8, 196, 0, 503, 49, 200, 51, 16, 31, 499], ["-", 51, 16, 12, 492, 3, 4, 0, 16, 31, 499], ["+", 51, 16, 12, 492, 3, 4, 0, 16, 31, 499]]
| 3
| 216
| 4
|
import java.util.*;
public class Main {
public static Scanner sc = new Scanner(System.in);
static int n;
public static void main(String[] args) {
while (read()) {
solve();
}
}
static boolean read() {
if (!sc.hasNext())
return false;
n = sc.nextInt();
return true;
}
static void solve() {
int cnt = 0;
int ans = 0;
if (n > 36)
System.out.println(0);
for (int i = 0; i <= 9; i++) {
for (int j = 0; j <= 9; j++) {
for (int k = 0; k <= 9; k++) {
for (int l = 0; l <= 9; l++) {
ans = i + j + k + l;
if (n == ans)
cnt++;
}
}
}
}
System.out.println(cnt);
}
}
|
import java.util.*;
public class Main {
public static Scanner sc = new Scanner(System.in);
static int n;
public static void main(String[] args) {
while (read()) {
solve();
}
}
static boolean read() {
if (!sc.hasNext())
return false;
n = sc.nextInt();
return true;
}
static void solve() {
int cnt = 0;
int ans = 0;
if (n > 36) {
System.out.println(0);
return;
}
for (int i = 0; i <= 9; i++) {
for (int j = 0; j <= 9; j++) {
for (int k = 0; k <= 9; k++) {
for (int l = 0; l <= 9; l++) {
ans = i + j + k + l;
if (n == ans)
cnt++;
}
}
}
}
System.out.println(cnt);
}
}
|
[["+", 0, 195, 8, 196, 0, 57, 64, 196, 0, 45], ["+", 8, 196, 0, 57, 64, 196, 0, 1, 0, 35], ["+", 8, 196, 0, 57, 64, 196, 0, 37, 0, 38], ["+", 0, 195, 8, 196, 0, 57, 64, 196, 0, 46]]
| 3
| 207
| 4
|
import java.util.Scanner;
class Main {
public static void main(String[] a) {
Scanner scan = new Scanner(System.in);
while (scan.hasNext()) {
int n = scan.nextInt();
int sum = 0;
if (n > 36)
System.out.println(0);
else {
for (int i = 1; i <= 9; i++) {
for (int j = 1; j <= 9; j++) {
for (int k = 1; k <= 9; k++) {
for (int l = 1; l <= 9; l++) {
if (i + j + k + l == n)
sum++;
}
}
}
}
System.out.println(sum);
}
}
}
}
|
import java.util.Scanner;
class Main {
public static void main(String[] a) {
Scanner scan = new Scanner(System.in);
while (scan.hasNext()) {
int n = scan.nextInt();
int sum = 0;
if (n > 36)
System.out.println(0);
else {
for (int i = 0; i <= 9; i++) {
for (int j = 0; j <= 9; j++) {
for (int k = 0; k <= 9; k++) {
for (int l = 0; l <= 9; l++) {
if (i + j + k + l == n)
sum++;
}
}
}
}
System.out.println(sum);
}
}
}
}
|
[["-", 75, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 75, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499]]
| 3
| 164
| 8
|
#include <stdio.h>
int main(void) {
int n;
while (scanf("%d", &n) != EOF) {
int a, b, c, d, count = 0;
for (a = 0; a <= 9; a++) {
for (b = 0; b <= 9; b++) {
for (c = 0; c <= 9; c++) {
for (d = 0; d <= 9; d++)
if (a + b + c + d == n)
count++;
}
}
}
printf("%d\\n", count);
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int n;
while (scanf("%d", &n) != EOF) {
int a, b, c, d, count = 0;
for (a = 0; a <= 9; a++) {
for (b = 0; b <= 9; b++) {
for (c = 0; c <= 9; c++) {
for (d = 0; d <= 9; d++)
if (a + b + c + d == n)
count++;
}
}
}
printf("%d\n", count);
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 0
| 128
| 3
|
#include <stdio.h>
int main() {
int i, j, k, l, a, cnt;
while (scanf("\n%d", &a) != EOF) {
for (i = 0; i < 10; i++) {
for (j = 0; j < 10; j++) {
for (k = 0; k < 10; k++) {
for (l = 0; l < 10; l++) {
if (i + j + k + l == a) {
cnt++;
}
}
}
}
}
printf("%d\n", cnt);
}
return 0;
}
|
#include <stdio.h>
int main() {
int i, j, k, l, a, cnt;
while (scanf("\n%d", &a) != EOF) {
cnt = 0;
for (i = 0; i < 10; i++) {
for (j = 0; j < 10; j++) {
for (k = 0; k < 10; k++) {
for (l = 0; l < 10; l++) {
if (i + j + k + l == a) {
cnt++;
}
}
}
}
}
printf("%d\n", cnt);
}
return 0;
}
|
[["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]]
| 0
| 128
| 4
|
#include <stdio.h>
int main(void) {
int a, b, c, d;
int count;
int n;
while (scanf("%d", &n) != EOF) {
for (a = 0; a <= 9; a++) {
for (b = 0; b <= 9; b++) {
for (c = 0; c <= 9; c++) {
for (d = 0; d <= 9; d++) {
if (a + b + c + d == n) {
count++;
}
}
}
}
}
printf("%d\n", count);
}
return (0);
}
|
#include <stdio.h>
int main(void) {
int a, b, c, d;
int count;
int n;
while (scanf("%d", &n) != EOF) {
count = 0;
for (a = 0; a <= 9; a++) {
for (b = 0; b <= 9; b++) {
for (c = 0; c <= 9; c++) {
for (d = 0; d <= 9; d++) {
if (a + b + c + d == n) {
count++;
}
}
}
}
}
printf("%d\n", count);
}
return (0);
}
|
[["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]]
| 0
| 132
| 4
|
#include <stdio.h>
main() {
int n, a, b, c, d, cnt;
while (scanf("%d", &n) != EOF) {
cnt = 0;
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) {
cnt += 1;
}
}
}
}
}
printf("%d", cnt);
}
return 0;
}
|
#include <stdio.h>
main() {
int n, a, b, c, d, cnt;
while (scanf("%d", &n) != EOF) {
cnt = 0;
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) {
cnt = cnt + 1;
}
}
}
}
}
printf("%d\n", cnt);
}
return 0;
}
|
[["-", 0, 57, 64, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 0
| 131
| 5
|
#include <stdio.h>
int main(void) {
int n;
int i, j, k, l;
int c;
while (scanf("%d", &n) != EOF) {
c = 0;
for (i = 0; i < 10; i++) {
for (j = 0; j < 10; j++) {
for (k = 0; k < 10; k++) {
for (l = 0; l < 10; l++) {
if (i + j + k + l == n) {
c++;
}
}
}
}
}
}
printf("%d\n", c);
return (0);
}
|
#include <stdio.h>
int main(void) {
int n;
int i, j, k, l;
int c;
while (scanf("%d", &n) != EOF) {
c = 0;
for (i = 0; i < 10; i++) {
for (j = 0; j < 10; j++) {
for (k = 0; k < 10; k++) {
for (l = 0; l < 10; l++) {
if (i + j + k + l == n) {
c++;
}
}
}
}
}
printf("%d\n", c);
}
return (0);
}
|
[["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]]
| 0
| 136
| 2
|
#include <stdio.h>
int main() {
int n;
int i, j, k, l;
int count = 0;
while (scanf("%d", &n) != EOF) {
for (i = 1; i < 10; i++) {
for (j = 1; j < 10; j++) {
for (k = 1; k < 10; k++) {
for (l = 1; l < 10; l++) {
if (i + j + k + l == n) {
count++;
}
}
}
}
}
printf("%d\n", count);
count = 0;
}
return 0;
}
|
#include <stdio.h>
int main() {
int n;
int i, j, k, l;
int count = 0;
while (scanf("%d", &n) != EOF) {
for (i = 0; i < 10; i++) {
for (j = 0; j < 10; j++) {
for (k = 0; k < 10; k++) {
for (l = 0; l < 10; l++) {
if (i + j + k + l == n) {
count++;
}
}
}
}
}
printf("%d\n", count);
count = 0;
}
return 0;
}
|
[["-", 0, 52, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 52, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13]]
| 0
| 135
| 8
|
#include <stdio.h>
int main() {
int data;
int a, b, c, d;
int pair = 0;
while (scanf("%d", &data) != EOF) {
for (a = 0; a <= 9; a++) {
for (b = 0; b <= 9; b++) {
for (c = 0; c <= 9; c++) {
for (d = 0; d <= 9; d++) {
if (data == a + b + c + d) {
pair++;
}
}
}
}
}
printf("%d", pair);
}
return 0;
}
|
#include <stdio.h>
int main() {
int data;
int a, b, c, d;
int pair = 0;
while (scanf("%d", &data) != EOF) {
pair = 0;
for (a = 0; a <= 9; a++) {
for (b = 0; b <= 9; b++) {
for (c = 0; c <= 9; c++) {
for (d = 0; d <= 9; d++) {
if (data == a + b + c + d) {
pair++;
}
}
}
}
}
printf("%d\n", pair);
}
return 0;
}
|
[["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 0
| 130
| 5
|
#include <stdio.h>
int main() {
int a, b, c, d, n, total = 0;
while (scanf("%d", &n) != EOF) {
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) {
total++;
}
}
}
}
}
printf("%d", total);
}
return (0);
}
|
#include <stdio.h>
int main() {
int a, b, c, d, n, total = 0;
while (scanf("%d", &n) != EOF) {
total = 0;
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) {
total++;
}
}
}
}
}
printf("%d\n", total);
}
return (0);
}
|
[["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 0
| 130
| 5
|
#include <stdio.h>
int main() {
int a, b, c, d, n, x = 0, count = 0;
while ((scanf("%d", &n)) != EOF) {
for (a = 0; a < 9; a++) {
for (b = 0; b < 9; b++) {
for (c = 0; c < 9; c++) {
for (d = 0; d < 9; d++) {
x = a + b + c + d;
if (x == n) {
count++;
}
}
}
}
}
printf("%d", count);
count = 0;
x = 0;
}
return 0;
}
|
#include <stdio.h>
int main() {
int a, b, c, d, n, x = 0, count = 0;
while ((scanf("%d", &n)) != EOF) {
for (a = 0; a <= 9; a++) {
for (b = 0; b <= 9; b++) {
for (c = 0; c <= 9; c++) {
for (d = 0; d <= 9; d++) {
x = a + b + c + d;
if (x == n) {
count++;
}
}
}
}
}
printf("%d\n", count);
count = 0;
x = 0;
}
return 0;
}
|
[["-", 0, 52, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 52, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 0
| 146
| 9
|
#include <stdio.h>
int main(void) {
int n, a, b, c, d, e, num = 0;
while (scanf("%d", &n) != EOF) {
for (a = 0; a < 10; a++) {
for (b = 0; b < 10; b++) {
for (c = 0; c < 10; c++) {
if ((0 <= n - a - b - c) && (n - a - b - c <= 9)) {
num++;
}
}
}
}
}
printf("%d\r\n", num);
return 0;
}
|
#include <stdio.h>
int main(void) {
int n, a, b, c, d, e, num = 0;
while (scanf("%d", &n) != EOF) {
num = 0;
for (a = 0; a < 10; a++) {
for (b = 0; b < 10; b++) {
for (c = 0; c < 10; c++) {
if ((0 <= n - a - b - c) && (n - a - b - c <= 9)) {
num++;
}
}
}
}
printf("%d\r\n", num);
}
return 0;
}
|
[["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]]
| 0
| 132
| 6
|
#include <stdio.h>
int main() {
int n;
int count;
int i, j, k, l;
while (scanf("%d", &n) != EOF) {
count = 0;
for (i = 0; i < 10; i++) {
for (j = 0; j < 10; j++) {
for (k = 0; k < 10; k++) {
for (l = 0; l < 10; l++) {
if ((i + j + k + l) == n)
count++;
}
}
}
}
}
printf("%d\n", count);
return 0;
}
|
#include <stdio.h>
int main() {
int n;
int count;
int i, j, k, l;
while (scanf("%d", &n) != EOF) {
count = 0;
for (i = 0; i < 10; i++) {
for (j = 0; j < 10; j++) {
for (k = 0; k < 10; k++) {
for (l = 0; l < 10; l++) {
if ((i + j + k + l) == n)
count++;
}
}
}
}
printf("%d\n", count);
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]]
| 0
| 133
| 2
|
#include <stdio.h>
int n;
int num;
int i, j, k, l;
int main() {
while (scanf("%d", &n) != -1) {
for (i = 0; i < 10; i++) {
for (j = 0; j < 10; j++) {
for (k = 0; k < 10; k++) {
for (l = 0; l < 10; l++) {
if (n == i + j + k + l) {
num++;
}
}
}
}
}
printf("%d\n", num);
}
return 0;
}
|
#include <stdio.h>
int n;
int num;
int i, j, k, l;
int main() {
while (scanf("%d", &n) != -1) {
num = 0;
for (i = 0; i < 10; i++) {
for (j = 0; j < 10; j++) {
for (k = 0; k < 10; k++) {
for (l = 0; l < 10; l++) {
if (n == i + j + k + l) {
num++;
}
}
}
}
}
printf("%d\n", num);
}
return 0;
}
|
[["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]]
| 0
| 129
| 4
|
#include <stdio.h>
int main() {
int n, count;
int a, b, c, d;
while (scanf("%d", &n) != EOF) {
count = 0;
for (a = 1; a <= 9; a++) {
for (b = 1; b <= 9; b++) {
for (c = 1; c <= 9; c++) {
for (d = 1; d <= 9; d++) {
if (a + b + c + d == n)
count++;
}
}
}
}
printf("%d\n", count);
}
return 0;
}
|
#include <stdio.h>
int main() {
int n, count;
int a, b, c, d;
while (scanf("%d", &n) != EOF) {
count = 0;
for (a = 0; a <= 9; a++) {
for (b = 0; b <= 9; b++) {
for (c = 0; c <= 9; c++) {
for (d = 0; d <= 9; d++) {
if (a + b + c + d == n)
count++;
}
}
}
}
printf("%d\n", count);
}
return 0;
}
|
[["-", 0, 52, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 52, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13]]
| 0
| 130
| 8
|
#include <stdio.h>
int main() {
int a, b, c, d, n, count = 0;
while (scanf("%d", &n) != EOF) {
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) {
count++;
}
}
}
}
}
printf("%d\n", count);
}
return (0);
}
|
#include <stdio.h>
int main() {
int a, b, c, d, n, count = 0;
while (scanf("%d", &n) != EOF) {
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) {
count++;
}
}
}
}
}
printf("%d\n", count);
count = 0;
}
return (0);
}
|
[["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]]
| 0
| 131
| 4
|
#include <stdio.h>
int main(void) {
int i, j, k, l, n, cnt;
while (scanf("%d", &n) != EOF) {
cnt = 0;
for (i = 0; i < 10; i++) {
for (j = 0; j < 10; j++) {
for (k = 0; k < 10; k++) {
for (l = 0; l < 10; l++) {
if (i + j + k + l == n) {
cnt++;
}
}
}
}
}
}
printf("%d\n", cnt);
return 0;
}
|
#include <stdio.h>
int main(void) {
int i, j, k, l, n, cnt;
while (scanf("%d", &n) != EOF) {
cnt = 0;
for (i = 0; i < 10; i++) {
for (j = 0; j < 10; j++) {
for (k = 0; k < 10; k++) {
for (l = 0; l < 10; l++) {
if (i + j + k + l == n) {
cnt++;
}
}
}
}
}
printf("%d\n", cnt);
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]]
| 0
| 132
| 2
|
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int count(int n) {
int res = 0;
int i, j, k, tem, tem1;
for (i = 0; i < 10; i++) {
if (n - i < 3)
return res;
tem = n - i;
for (j = 0; j < 10; j++) {
if (tem - j < 2)
return res;
tem1 = tem - j;
for (k = 0; k < 10; k++) {
if (tem1 - k < 0 || tem1 - k > 9)
continue;
res++;
}
}
}
return res;
}
int main(void) {
int n;
while (scanf("%d", &n) != EOF)
printf("%d\n", count(n));
return 0;
}
|
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int count(int n) {
int res = 0;
int i, j, k, tem, tem1;
for (i = 0; i < 10; i++) {
if (n - i < 0)
return res;
tem = n - i;
for (j = 0; j < 10; j++) {
if (tem - j < 0)
break;
tem1 = tem - j;
for (k = 0; k < 10; k++) {
if (tem1 - k < 0 || tem1 - k > 9)
continue;
res++;
}
}
}
return res;
}
int main(void) {
int n;
while (scanf("%d", &n) != EOF)
printf("%d\n", count(n));
return 0;
}
|
[["-", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 57, 64, 37, 0, 38], ["-", 0, 7, 8, 9, 0, 57, 64, 37, 0, 22], ["+", 0, 7, 8, 9, 0, 57, 64, 93, 0, 94]]
| 0
| 173
| 7
|
#include <stdio.h>
int sumOf4(int n) {
int a, b, c, d, cout;
for (a = 0; a <= 9; a++) {
for (b = 0; b <= a; b++) {
for (c = 0; c <= b; c++) {
for (d = 0; d <= c; d++) {
if (a + b + c + d == n) {
cout += 1;
}
}
}
}
}
return cout;
}
int main() {
int n;
int cout;
while (scanf("%d", &n) != EOF) {
cout = sumOf4(n);
printf("%d\n", cout);
}
return 0;
}
|
#include <stdio.h>
int sumOf4(int n) {
int a, b, c, d, cout = 0;
for (a = 0; a <= 9; a++) {
for (b = 0; b <= 9; b++) {
for (c = 0; c <= 9; c++) {
for (d = 0; d <= 9; d++) {
if (a + b + c + d == n) {
cout += 1;
}
}
}
}
}
return cout;
}
int main() {
int n;
int cout;
while (scanf("%d", &n) != EOF) {
cout = sumOf4(n);
printf("%d\n", cout);
}
return 0;
}
|
[["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]]
| 0
| 150
| 8
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.