submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s359028523
p00007
C++
#include <iostream> using namespace std; int main () { int n, i; double a = 100000; cin >> n; for(i=0;i<n;i++) { a *= 1.05; while(a%1000!=0) { a += 1; } } cout << a << endl; }
a.cc: In function 'int main()': a.cc:10:16: error: invalid operands of types 'double' and 'int' to binary 'operator%' 10 | while(a%1000!=0) { | ~^~~~~ | | | | | int | double
s444672656
p00007
C++
#include <iostream> #include <algorithm> int main() { const int BASE = 100000; int n, debt = BASE; std::cin >> n; while (n--) { debt = (loan * 1.05 + 999) / 1000; debt *= 1000; } std::cout << debt << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:9:13: error: 'loan' was not declared in this scope 9 | debt = (loan * 1.05 + 999) / 1000; | ^~~~
s473168891
p00007
C++
#include <iostream> using namespace std; int main() { unsigned long long debt = 100000; int n; for (int i = 0; i < n; ++i) { debt *= 1.05; const int under debt -= (debt % 2000) - 2000; } cout << debt << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:9: error: expected initializer before 'debt' 13 | debt -= (debt % 2000) - 2000; | ^~~~
s081454732
p00007
C++
#include <cstdio> using namespace std; in main() { int n = 0; double N = 0; int M = 100; int L = 100; scanf("%d", &n); for (int i = 0; i < n; i++) { N = L; N = M; N *= 1.05; N -= M; L += N; while (N> 1){ N -= 1; } if (N > 0) { L += 1; } } L *= 1000; printf("%d", L); return 0; }
a.cc:5:1: error: 'in' does not name a type; did you mean 'int'? 5 | in main() { | ^~ | int
s343726746
p00007
C++
import java.math.BigDecimal; class Main { public void main(int week) { BigDecimal shakkin = new BigDecimal(100000); BigDecimal taxper = new BigDecimal(0.05); BigDecimal rishi; int a = 0; for (int i = 0; i <= week; i++) { // 5%の利子を計算する rishi = shakkin.multiply(taxper); // 5%の利子を元金に足す shakkin = shakkin.add(rishi); // 1000円未満を切り上げる a = shakkin.setScale(-3, BigDecimal.ROUND_UP).intValue(); } System.out.println(a); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.math.BigDecimal; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:7: error: expected ':' before 'void' 3 | public void main(int week) { | ^~~~~ | : a.cc:20:2: error: expected ';' after class definition 20 | } | ^ | ; a.cc: In member function 'void Main::main(int)': a.cc:5:17: error: 'BigDecimal' was not declared in this scope 5 | BigDecimal shakkin = new BigDecimal(100000); | ^~~~~~~~~~ a.cc:6:28: error: expected ';' before 'taxper' 6 | BigDecimal taxper = new BigDecimal(0.05); | ^~~~~~ a.cc:7:28: error: expected ';' before 'rishi' 7 | BigDecimal rishi; | ^~~~~ a.cc:12:25: error: 'rishi' was not declared in this scope 12 | rishi = shakkin.multiply(taxper); | ^~~~~ a.cc:12:33: error: 'shakkin' was not declared in this scope 12 | rishi = shakkin.multiply(taxper); | ^~~~~~~ a.cc:12:50: error: 'taxper' was not declared in this scope 12 | rishi = shakkin.multiply(taxper); | ^~~~~~ a.cc:18:17: error: 'System' was not declared in this scope 18 | System.out.println(a); | ^~~~~~
s750479235
p00007
C++
import java.math.BigDecimal; import java.util.Scanner; class Main { public static final int DEPT = 100000; public static final BigDecimal INTEREST = new BigDecimal(0.05); public static void main(String[] args) { Scanner s = new Scanner(System.in); int week = Integer.parseInt(s.next()); BigDecimal repay = new BigDecimal(DEPT); for (int i = 0; i < week; ++i) { repay = repay.add(repay.multiply(INTEREST)); } s.close(); System.out.println(repay.divide(new BigDecimal(10000), 0, BigDecimal.ROUND_CEILING).multiply(new BigDecimal(10000))); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.math.BigDecimal; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.Scanner; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:6:11: error: expected ':' before 'static' 6 | public static final int DEPT = 100000; | ^~~~~~~ | : a.cc:6:19: error: 'final' does not name a type 6 | public static final int DEPT = 100000; | ^~~~~ a.cc:8:11: error: expected ':' before 'static' 8 | public static final BigDecimal INTEREST = new BigDecimal(0.05); | ^~~~~~~ | : a.cc:8:19: error: 'final' does not name a type 8 | public static final BigDecimal INTEREST = new BigDecimal(0.05); | ^~~~~ a.cc:10:11: error: expected ':' before 'static' 10 | public static void main(String[] args) { | ^~~~~~~ | : a.cc:10:29: error: 'String' has not been declared 10 | public static void main(String[] args) { | ^~~~~~ a.cc:10:38: error: expected ',' or '...' before 'args' 10 | public static void main(String[] args) { | ^~~~ a.cc:26:2: error: expected ';' after class definition 26 | } | ^ | ; a.cc: In static member function 'static void Main::main(int*)': a.cc:11:9: error: 'Scanner' was not declared in this scope 11 | Scanner s = new Scanner(System.in); | ^~~~~~~ a.cc:12:20: error: 'Integer' was not declared in this scope 12 | int week = Integer.parseInt(s.next()); | ^~~~~~~ a.cc:12:37: error: 's' was not declared in this scope 12 | int week = Integer.parseInt(s.next()); | ^ a.cc:14:9: error: 'BigDecimal' was not declared in this scope 14 | BigDecimal repay = new BigDecimal(DEPT); | ^~~~~~~~~~ a.cc:17:13: error: 'repay' was not declared in this scope 17 | repay = repay.add(repay.multiply(INTEREST)); | ^~~~~ a.cc:17:46: error: 'INTEREST' was not declared in this scope 17 | repay = repay.add(repay.multiply(INTEREST)); | ^~~~~~~~ a.cc:22:9: error: 'System' was not declared in this scope 22 | System.out.println(repay.divide(new BigDecimal(10000), 0, | ^~~~~~ a.cc:22:28: error: 'repay' was not declared in this scope 22 | System.out.println(repay.divide(new BigDecimal(10000), 0, | ^~~~~ a.cc:22:45: error: expected type-specifier before 'BigDecimal' 22 | System.out.println(repay.divide(new BigDecimal(10000), 0, | ^~~~~~~~~~ a.cc:23:56: error: expected type-specifier before 'BigDecimal' 23 | BigDecimal.ROUND_CEILING).multiply(new BigDecimal(10000))); | ^~~~~~~~~~
s418121578
p00007
C++
#include <iostream> using namespace std; int main() { // your code goes here int n,ans; ans = 100000 cin >> n; for (int i=0;i<n;i++) { ans = ans * 1.05; if (ans%1000!=0)ans=ans + ans%1000 } cout << ans; return 0; }
a.cc: In function 'int main()': a.cc:7:21: error: expected ';' before 'cin' 7 | ans = 100000 | ^ | ; 8 | cin >> n; | ~~~ a.cc:11:51: error: expected ';' before '}' token 11 | if (ans%1000!=0)ans=ans + ans%1000 | ^ | ; 12 | } | ~
s356440017
p00007
C++
#include <iostream> using namespace std; int main() { // your code goes here int n,ans; ans = 100000; cin >> n; for (int i=0;i<n;i++) { ans = ans * 1.05; if (ans%1000!=0)ans=ans + ans%1000 } cout << ans; return 0; }
a.cc: In function 'int main()': a.cc:11:51: error: expected ';' before '}' token 11 | if (ans%1000!=0)ans=ans + ans%1000 | ^ | ; 12 | } | ~
s291338759
p00007
C++
#include <iostream> using namespace std; ?? int main() { ????????????int n = 100000; ????????????cin >> n; ????????????for (int i=0;i<n;i++) { ????????????????????????n = 1.05*n; ????????????????????????if (n%1000!=0) { ????????????????????????????????????n = n + (1000-n%1000); ????????????????????????} ????????????} ????????????cout << n; ????????????return 0; }
a.cc:3:1: error: expected unqualified-id before '?' token 3 | ?? | ^
s285024923
p00007
C++
#include <iostream> using namespace std; ?? int main() { ????????????int n,x; x = 100000; ????????????cin >> n; ????????????for (int i=0;i<n;i++) { ????????????????????????x = 1.05*x; ????????????????????????if (x%1000!=0) { ????????????????????????????????????x = x + (1000-x%1000); ????????????????????????} ????????????} ????????????cout << x; ????????????return 0; }
a.cc:3:1: error: expected unqualified-id before '?' token 3 | ?? | ^
s548889735
p00007
C++
13530000
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 13530000 | ^~~~~~~~
s933064098
p00007
C++
#include <iostream> int main(){ int n; while(std::cin >> n){ double result=100; while(n--){ result*=1.05; if(result%1000!=0)result+=1000-result%1000; } result*=1000; std::cout << (int)result << std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:34: error: invalid operands of types 'double' and 'int' to binary 'operator%' 9 | if(result%1000!=0)result+=1000-result%1000; | ~~~~~~^~~~~ | | | | double int a.cc:9:62: error: invalid operands of types 'double' and 'int' to binary 'operator%' 9 | if(result%1000!=0)result+=1000-result%1000; | ~~~~~~^~~~~ | | | | double int
s640023956
p00007
C++
int main(void) { int i, n, k; scanf("%d",&n); i = 100000; while (n > 0) { i = i * 1.05; if(!(i % 1000 == 0)) { k = i % 1000; i = i + 1000 - k; } n--; } printf("%d\n", i); return 0; }
a.cc: In function 'int main()': a.cc:3:5: error: 'scanf' was not declared in this scope 3 | scanf("%d",&n); | ^~~~~ a.cc:14:5: error: 'printf' was not declared in this scope 14 | printf("%d\n", i); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 | int main(void) {
s198369775
p00007
C++
a=1e5;main(N){scanf("%d",&N);while(N--)a*=1.05,a+=(a%1000)?1e3-a%1000:0;a=!printf("%d\n",a);}
a.cc:1:1: error: 'a' does not name a type 1 | a=1e5;main(N){scanf("%d",&N);while(N--)a*=1.05,a+=(a%1000)?1e3-a%1000:0;a=!printf("%d\n",a);} | ^ a.cc:1:11: error: expected constructor, destructor, or type conversion before '(' token 1 | a=1e5;main(N){scanf("%d",&N);while(N--)a*=1.05,a+=(a%1000)?1e3-a%1000:0;a=!printf("%d\n",a);} | ^
s848787237
p00007
C++
#include<iostream> int main(){ int n,a,i std::cin>>n; for(a=100000,i=0;i<n;++i){ a=a+a/20; if(a%1000=0){ a=a+1000-a%1000 } ++a } std::cout<<a<<std::endl; } return 0;
a.cc: In function 'int main()': a.cc:5:1: error: expected initializer before 'std' 5 | std::cin>>n; | ^~~ a.cc:6:15: error: 'i' was not declared in this scope 6 | for(a=100000,i=0;i<n;++i){ | ^ a.cc:8:13: error: lvalue required as left operand of assignment 8 | if(a%1000=0){ | ~^~~~~ a.cc:9:24: error: expected ';' before '}' token 9 | a=a+1000-a%1000 | ^ | ; 10 | } | ~ a.cc:11:12: error: expected ';' before '}' token 11 | ++a | ^ | ; 12 | } | ~ a.cc: At global scope: a.cc:15:9: error: expected unqualified-id before 'return' 15 | return 0; | ^~~~~~
s768021925
p00007
C++
main = do n <- readLn :: IO Int let debt x = 100 * ceiling $ x * 0.0105 print $ iterate n debt x !! n
a.cc:1:1: error: 'main' does not name a type 1 | main = do | ^~~~
s169893416
p00007
C++
#include <iostream> #include<math.h> using namespace std; int main(void){ unsigned long int n, sum = 100000; long double Ceil; cin >> n; for (int i = 0; i < n; i++){ sum /= 1000; Ceil = ceil(sum*1.05); sum=Ceil*1000; } cout << unsigned long int(sum) << endl; return 0; }
a.cc: In function 'int main()': a.cc:20:17: error: expected primary-expression before 'unsigned' 20 | cout << unsigned long int(sum) << endl; | ^~~~~~~~
s380034049
p00007
C++
#include <iostream> using namespace std; int main() { int n; cin >> n; int ans = 100000; int tmp; for (int i=0; i<n; i++) { ans *= 1.05; tmp = ans / 1000 * 1000; if (tmp != ans) ans = tmp + 1000; } cout << ans << endl; return 0;
a.cc: In function 'int main()': a.cc:15:18: error: expected '}' at end of input 15 | return 0; | ^ a.cc:5:12: note: to match this '{' 5 | int main() { | ^
s224758280
p00007
C++
a=100000 gets.to_i.times{a=a*105/100;a=(a/1000+1)*1000 if a%1000!=0;} puts a
a.cc:1:1: error: 'a' does not name a type 1 | a=100000 | ^ a.cc:3:1: error: 'puts' does not name a type 3 | puts a | ^~~~
s726738612
p00007
C++
a=100000;gets.to_i.times{a=a*105/100;a=(a/1000+1)*1000 if a%1000!=0;};puts a
a.cc:1:1: error: 'a' does not name a type 1 | a=100000;gets.to_i.times{a=a*105/100;a=(a/1000+1)*1000 if a%1000!=0;};puts a | ^ a.cc:1:10: error: 'gets' does not name a type 1 | a=100000;gets.to_i.times{a=a*105/100;a=(a/1000+1)*1000 if a%1000!=0;};puts a | ^~~~ a.cc:1:71: error: 'puts' does not name a type 1 | a=100000;gets.to_i.times{a=a*105/100;a=(a/1000+1)*1000 if a%1000!=0;};puts a | ^~~~
s082498404
p00007
C++
a=100000;gets.to_i.times{a=((a*1.05/1000).ceil)*1000;};puts a;
a.cc:1:1: error: 'a' does not name a type 1 | a=100000;gets.to_i.times{a=((a*1.05/1000).ceil)*1000;};puts a; | ^ a.cc:1:10: error: 'gets' does not name a type 1 | a=100000;gets.to_i.times{a=((a*1.05/1000).ceil)*1000;};puts a; | ^~~~ a.cc:1:56: error: 'puts' does not name a type 1 | a=100000;gets.to_i.times{a=((a*1.05/1000).ceil)*1000;};puts a; | ^~~~
s612527153
p00007
C++
#include<iostream> #include<string> using namespace std; int main(){ double a=100000; int n; cin>>n; for(int i=0;i<n;i++){ a*=1.05; if(a%1000==0) a-=1000; a/=1000; a*=1000; a+=1000; } cout<<a<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:21: error: invalid operands of types 'double' and 'int' to binary 'operator%' 10 | if(a%1000==0) | ~^~~~~ | | | | | int | double
s217748972
p00007
C++
#include <iostream> using namespace std; int main() { int n; while (cin >> n) { while (n--) { money *= 1.05; } if (money % 10000 != 0) { money -= (money % 10000); money += 10000; } cout << money << endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:25: error: 'money' was not declared in this scope 11 | money *= 1.05; | ^~~~~ a.cc:13:21: error: 'money' was not declared in this scope 13 | if (money % 10000 != 0) | ^~~~~ a.cc:18:25: error: 'money' was not declared in this scope 18 | cout << money << endl; | ^~~~~
s549004212
p00007
C++
#include <iostream> using namespace std; int main() { double monthlyPayment; double balance; double interestRate; int month = 1; cout.setf(ios::fixed); // These lines force currency format in output to 2 decimal pts cout.setf(ios::showpoint); cout.precision(2); cout << "Enter the current balance of your loan: $"; cin >> balance; cout << "Enter the interest rate (compounded monthly) : "; cin >> interestRate; cout << "Enter the desired monthly payment : $"; cin >> monthlyPayment; while (interestRate >= 1) { interestRate = interestRate / 100; } balance = balance * (1 + interestRate / 12) - monthlyPayment; // this is where the program stops. cout << "After month 1 your balance is $" << balance << endl; while (balance > 0) { balance = balance * (1 + interestRate / 12) - monthlyPayment; month = month++; cout << "After month " << month << ", your balance is : $" << balance << endl; } cout << "You have paid off the loan at this point. Congratulations!" << endl; return 0;
a.cc: In function 'int main()': a.cc:45:18: error: expected '}' at end of input 45 | return 0; | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s215723517
p00007
C++
#include<stdio.h> #include<stdlib.h> #include<iostream> #include<string> #include<vector> #include<math.h> #include<queue> #include <algorithm> #include<functional> #include<cstdlib> #include<cmath> #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i >= 0;i--) #define FOR(i, m, n) for(int i = m;i < n;i++) #define FORR(i, m, n) for(int i = m;i >= n;i--) #define CI cin >> #define CO cout << #define E << endl; using namespace std; typedef pair<int, int> P; typedef pair<long, long> LP; typedef pair<int, P> PP; typedef pair<long, LP> LPP; int dy[] = { 0, 0, 1, -1, 0 }; int dx[] = { 1, -1, 0, 0, 0 }; int A = 0, B = 0, K = 0, T = 0, W = 0, N = 0, H = 0; int n = 0; double L = 0; double S = 0; double ar = 0, br = 0, cr = 0; int answer = 0; string C; string sA, strB; vector<vector<char>> map; vector<double> num; vector<string> str; int sum = 0; vector<int> value; vector<int> weight; int dp[110][10010]; int data_[210][2] = { -2 }; void input(void) { CI n; return; } int main(void) { input(); long long double money = 100000; for (int i = 0; i < n; i++) { money *= 1.05; if ((int)money % 1000 > 0) { money = money - ((int)(money) % 1000) + 1000 - (money - (double)(int)money); } } CO money E return 0; }
a.cc: In function 'int main()': a.cc:64:14: error: 'long long' specified with 'double' 64 | long long double money = 100000; | ^~~~
s204845469
p00007
C++
#include<iostream> #include<math.h> #include<stdio.h> #include<windows.h> using namespace std; int main() { int n; double dbt; dbt = 100000; cin >> n; for (; n > 0; n--) { dbt = dbt * 1.05; dbt = dbt / 1000; dbt = ceil(dbt); dbt = dbt * 1000; } cout << dbt << endl; return 0; }
a.cc:4:9: fatal error: windows.h: No such file or directory 4 | #include<windows.h> | ^~~~~~~~~~~ compilation terminated.
s731029299
p00007
C++
#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; }
a.cc: In function 'int main()': a.cc:5:9: error: expected initializer before 'float' 5 | float p | ^~~~~ a.cc:7:9: error: 'p' was not declared in this scope 7 | p=1.05; | ^ a.cc:8:13: error: 'i' was not declared in this scope 8 | for(i=0;i<n;i++){ | ^ a.cc:8:19: error: 'n' was not declared in this scope 8 | for(i=0;i<n;i++){ | ^ a.cc:9:17: error: 'w' was not declared in this scope 9 | w=100000*p; | ^ a.cc:12:18: error: expected '}' at end of input 12 | } | ^ a.cc:8:25: note: to match this '{' 8 | for(i=0;i<n;i++){ | ^ a.cc:12:18: error: expected '}' at end of input 12 | } | ^ a.cc:3:1: note: to match this '{' 3 | { | ^
s922083269
p00007
C++
#include<iostream> #include<algorithm> #include<cstring> using namespace std; int main(){ int >> n; cin >> n; price = 100000; for(int i = 0; i < n; i++){ price *= 1.05; } if(price % 1000 !== 0) price = price -(price % 1000) + 1000; cout << price << endl; }
a.cc: In function 'int main()': a.cc:7:7: error: expected unqualified-id before '>>' token 7 | int >> n; | ^~ a.cc:8:10: error: 'n' was not declared in this scope 8 | cin >> n; | ^ a.cc:9:3: error: 'price' was not declared in this scope 9 | price = 100000; | ^~~~~ a.cc:13:21: error: expected primary-expression before '=' token 13 | if(price % 1000 !== 0) | ^
s284882690
p00007
C++
#include <iostream> #include <math.h> using namespace std; void test(); int interest(int debt, float interest_rate, int n); int main(void) { test(); return 0; } void test() { int debt,n; double money; float interest_rate; debt = 100000; interest_rate = 1.05; cin >> n; debt = interest(debt, interest_rate, n); money = (double) debt / 10000; // 1000?????\???????°???°?????\?????? money = ceil(money) * 10000;??????????????????// ?°???°?????\????????????????????????????????? debt = money; cout << debt << endl; } int interest(int debt, float interest_rate,int n)??????//?????°??¢??° { if (n == 1) return debt * interest_rate; else return interest(debt, interest_rate, n - 1) * interest_rate; }
a.cc:28:53: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 28 | money = ceil(money) * 10000;??????????????????// ?°???°?????\????????????????????????????????? a.cc:35:54: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 35 | int interest(int debt, float interest_rate,int n)??????//?????°??¢??° a.cc: In function 'void test()': a.cc:28:37: error: expected primary-expression before '?' token 28 | money = ceil(money) * 10000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:38: error: expected primary-expression before '?' token 28 | money = ceil(money) * 10000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:39: error: expected primary-expression before '?' token 28 | money = ceil(money) * 10000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:40: error: expected primary-expression before '?' token 28 | money = ceil(money) * 10000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:41: error: expected primary-expression before '?' token 28 | money = ceil(money) * 10000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:42: error: expected primary-expression before '?' token 28 | money = ceil(money) * 10000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:43: error: expected primary-expression before '?' token 28 | money = ceil(money) * 10000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:44: error: expected primary-expression before '?' token 28 | money = ceil(money) * 10000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:45: error: expected primary-expression before '?' token 28 | money = ceil(money) * 10000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:46: error: expected primary-expression before '?' token 28 | money = ceil(money) * 10000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:47: error: expected primary-expression before '?' token 28 | money = ceil(money) * 10000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:48: error: expected primary-expression before '?' token 28 | money = ceil(money) * 10000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:49: error: expected primary-expression before '?' token 28 | money = ceil(money) * 10000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:50: error: expected primary-expression before '?' token 28 | money = ceil(money) * 10000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:51: error: expected primary-expression before '?' token 28 | money = ceil(money) * 10000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:52: error: expected primary-expression before '?' token 28 | money = ceil(money) * 10000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:53: error: expected primary-expression before '?' token 28 | money = ceil(money) * 10000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:54: error: expected primary-expression before '?' token 28 | money = ceil(money) * 10000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc: At global scope: a.cc:35:50: error: expected initializer before '?' token 35 | int interest(int debt, float interest_rate,int n)??????//?????°??¢??° | ^
s375783056
p00007
C++
#include <iostream> #include <math.h> using namespace std; void test(); int interest(int debt, float interest_rate, int n); int main(void) { test(); return 0; } void test() { int debt,n; double money; float interest_rate; debt = 100000; interest_rate = 1.05; cin >> n; debt = interest(debt, interest_rate, n); money = (double) debt / 1000; // 1000?????????????°???°?????\?????? money = ceil(money) * 1000;??????????????????// ?°???°?????\????????????????????????????????? debt = money; cout << debt << endl; } int interest(int debt, float interest_rate,int n)??????//?????°??¢??° { if (n == 1) return debt * interest_rate; else return interest(debt, interest_rate, n - 1) * interest_rate; }
a.cc:28:52: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 28 | money = ceil(money) * 1000;??????????????????// ?°???°?????\????????????????????????????????? a.cc:35:54: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 35 | int interest(int debt, float interest_rate,int n)??????//?????°??¢??° a.cc: In function 'void test()': a.cc:28:36: error: expected primary-expression before '?' token 28 | money = ceil(money) * 1000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:37: error: expected primary-expression before '?' token 28 | money = ceil(money) * 1000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:38: error: expected primary-expression before '?' token 28 | money = ceil(money) * 1000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:39: error: expected primary-expression before '?' token 28 | money = ceil(money) * 1000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:40: error: expected primary-expression before '?' token 28 | money = ceil(money) * 1000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:41: error: expected primary-expression before '?' token 28 | money = ceil(money) * 1000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:42: error: expected primary-expression before '?' token 28 | money = ceil(money) * 1000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:43: error: expected primary-expression before '?' token 28 | money = ceil(money) * 1000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:44: error: expected primary-expression before '?' token 28 | money = ceil(money) * 1000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:45: error: expected primary-expression before '?' token 28 | money = ceil(money) * 1000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:46: error: expected primary-expression before '?' token 28 | money = ceil(money) * 1000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:47: error: expected primary-expression before '?' token 28 | money = ceil(money) * 1000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:48: error: expected primary-expression before '?' token 28 | money = ceil(money) * 1000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:49: error: expected primary-expression before '?' token 28 | money = ceil(money) * 1000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:50: error: expected primary-expression before '?' token 28 | money = ceil(money) * 1000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:51: error: expected primary-expression before '?' token 28 | money = ceil(money) * 1000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:52: error: expected primary-expression before '?' token 28 | money = ceil(money) * 1000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:28:53: error: expected primary-expression before '?' token 28 | money = ceil(money) * 1000;??????????????????// ?°???°?????\????????????????????????????????? | ^ a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc:30:21: error: expected ':' before ';' token 30 | debt = money; | ^ | : a.cc:30:21: error: expected primary-expression before ';' token a.cc: At global scope: a.cc:35:50: error: expected initializer before '?' token 35 | int interest(int debt, float interest_rate,int n)??????//?????°??¢??° | ^
s242685595
p00007
C++
#include <iostream> #include <math.h> using namespace std; void test(); int interest(int debt, float interest_rate, int n); int main(void) { test(); return 0; } void test() { int debt,n; double money; float interest_rate; debt = 100000; interest_rate = 1.05; cin >> n; debt = interest(debt, interest_rate, n); money = (double) debt / 1000;// 1000?????\???????°???°?????\?????? money = ceil(money) * 1000;// ?°???°?????\????????????????????????????????? debt = money; cout << debt << endl; } int interest(int debt, float interest_rate,int n)??????//?????°??¢??° { if (n == 1) return debt * interest_rate; else return interest(debt, interest_rate, n - 1) * interest_rate; }
a.cc:35:54: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 35 | int interest(int debt, float interest_rate,int n)??????//?????°??¢??° a.cc:35:50: error: expected initializer before '?' token 35 | int interest(int debt, float interest_rate,int n)??????//?????°??¢??° | ^
s694992269
p00007
C++
#include <iostream> #include <math.h> using namespace std; void test3()??? int interest(int debt, double interest_rate,int n); int main(void) { test(); return 0; } void test() { int debt,n; debt = 100000; cin >> n; debt = interest(debt, 1.05, n) ; if (debt % 1000 > 0) { debt = debt - (int)debt % 1000 + 1000; } cout << debt << endl; } int interest(int debt, double interest_rate,int n) { if (n == 0) return debt * interest_rate; else return ceil(interest(debt, interest_rate, n - 1) * interest_rate); }
a.cc:5:13: error: expected initializer before '?' token 5 | void test3()??? | ^ a.cc: In function 'int main()': a.cc:11:9: error: 'test' was not declared in this scope 11 | test(); | ^~~~ a.cc: In function 'void test()': a.cc:21:16: error: 'interest' was not declared in this scope 21 | debt = interest(debt, 1.05, n) ; | ^~~~~~~~
s916595602
p00007
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <set> #include <map> //ranker using namespace std; using ll = long long; using lli = ll int; using ull = unsigned long long; using vi = vector<int>; using vvi = vector<vi>; using vvvi = vector<vvi>; using pii = pair<int, int>; using pis = pair<int, string>; using psi = pair<string, int>; using D = double; int main() { int n, sum=100000; int i, j, k; int sum, tot, ans, num; cin >> n; for(i=0; i<n; i++){ sum += sum*(i+1)*0.05; sum = (sum/1000+1)*1000; } cout << sum << endl return 0; }
a.cc:11:13: error: two or more data types in declaration of 'type name' 11 | using lli = ll int; | ^~ a.cc: In function 'int main()': a.cc:26:7: error: redeclaration of 'int sum' 26 | int sum, tot, ans, num; | ^~~ a.cc:24:10: note: 'int sum' previously declared here 24 | int n, sum=100000; | ^~~ a.cc:33:22: error: expected ';' before 'return' 33 | cout << sum << endl | ^ | ; 34 | return 0; | ~~~~~~
s508174337
p00007
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <set> #include <map> //ranker using namespace std; using ll = long long; using lli = ll int; using ull = unsigned long long; using vi = vector<int>; using vvi = vector<vi>; using vvvi = vector<vvi>; using pii = pair<int, int>; using pis = pair<int, string>; using psi = pair<string, int>; using D = double; int main() { int n, sum=100000; int i, j, k; int tot, ans, num; cin >> n; for(i=0; i<n; i++){ sum += sum*(i+1)*0.05; sum = (sum/1000+1)*1000; } cout << sum << endl return 0; }
a.cc:11:13: error: two or more data types in declaration of 'type name' 11 | using lli = ll int; | ^~ a.cc: In function 'int main()': a.cc:33:22: error: expected ';' before 'return' 33 | cout << sum << endl | ^ | ; 34 | return 0; | ~~~~~~
s173288269
p00007
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <set> #include <map> //ranker using namespace std; using ll = long long; using lli = ll int; using ull = unsigned long long; using vi = vector<int>; using vvi = vector<vi>; using vvvi = vector<vvi>; using pii = pair<int, int>; using pis = pair<int, string>; using psi = pair<string, int>; using D = double; int main() { int n, sum=100000; int i, j, k; int tot, ans, num; cin >> n; for(i=0; i<n; i++){ sum += sum*(i+1)*0.05; sum = (sum/1000+1)*1000; } cout << sum << endl; return 0; }
a.cc:11:13: error: two or more data types in declaration of 'type name' 11 | using lli = ll int; | ^~
s831456283
p00007
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <set> #include <map> #include <cmath> //ranker using namespace std; #define REPS(i, a, n) for (int i = (a); i < (n); ++i) #define REP(i, n) REPS(i, 0, n) #define RREP(i, n) REPS(i, 1, n + 1) #define DEPS(i, a, n) for (int i = (a); i >= n; --i) #define DEP(i, n) DEPS(i, n, 0) using ll = long long; using ull = unsigned long long; using vi = vector<int>; using vvi = vector<vi>; using vvvi = vector<vvi>; using pii = pair<int, int>; using pis = pair<int, string>; using psi = pair<string, int>; using D = double; const int Max=10000000; bool prime[Max]; int main(void){ int n, sum=100000; cin<<n; for(int i=0; i<n; i++){ sum = 1.05*sum; sum = (sum/1000+1)*1000; } cout << sum << endl; }
a.cc: In function 'int main()': a.cc:32:4: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 32 | cin<<n; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:32:4: note: candidate: 'operator<<(int, int)' (built-in) 32 | cin<<n; | ~~~^~~ a.cc:32:4: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:32:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 32 | cin<<n; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:32:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 32 | cin<<n; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:32:1: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 32 | cin<<n; | ^~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:32:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 32 | cin<<n; | ^ /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:32:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 32 | cin<<n; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:32:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 32 | cin<<n; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:32:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 32 | cin<<n; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:32:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 32 | cin<<n; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:32:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 32 | cin<<n; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:32:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 32 | cin<<n; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:32:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 32 | cin<<n; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:32:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 32 | cin<<n; | ^ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:32:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 32 | cin<<n; | ^ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)' 689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed: a.cc:32:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 32 | cin<<n; | ^ /usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed: /usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = int]': a.cc:32:6: required from here 32 | cin<<n; | ^ /usr/include/c++/14/ostream:810:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~
s458169330
p00007
C++
#include <iostream> int main(){ int n; int debt = 100000; std::cin >> n; for(int i=0; i<n; i++){ debt = round((double)debt * 1.05); int under = debt % 1000; if(under==0) else{ debt = debt - under + 1000; } } std::cout << debt << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:9:12: error: 'round' was not declared in this scope 9 | debt = round((double)debt * 1.05); | ^~~~~ a.cc:12:5: error: expected primary-expression before 'else' 12 | else{ | ^~~~
s694420653
p00007
C++
#include <iostream> int main(){ int n; int debt = 100000; std::cin >> n; for(int i=0; i<n; i++){ debt = round((double)debt * 1.05); int under = debt % 1000; if(under==0) else{ debt = debt - under + 1000; } } std::cout << debt << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:9:12: error: 'round' was not declared in this scope 9 | debt = round((double)debt * 1.05); | ^~~~~ a.cc:12:5: error: expected primary-expression before 'else' 12 | else{ | ^~~~
s204282513
p00007
C++
#include <iostream> #include <math.h> int main(){ int n; int debt = 100000; std::cin >> n; for(int i=0; i<n; i++){ debt = round((double)debt * 1.05); int under = debt % 1000; if(under==0) else{ debt = debt - under + 1000; } } std::cout << debt << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:13:5: error: expected primary-expression before 'else' 13 | else{ | ^~~~
s174911328
p00007
C++
#include<iostream> //#include<algorithm> //#include<cmath> //#include<string> //#include<cctype> //#include <vector> using namespace std; int main(){ int a=100,n; cin >> n; while (n--) a = ceil(a*1.05); cout << a * 1000 << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:25: error: 'ceil' was not declared in this scope 11 | while (n--) a = ceil(a*1.05); | ^~~~
s182758233
p00007
C++
import sys import math as m n=int(input()) out=100000 for i in range(n): out=m.ceil(out*1.05/1000)*1000 print(out) #for i in sys.stdin: # a,b=map(int,i.split()) # print(gcd(a,b),lcm(a,b))
a.cc:9:2: error: invalid preprocessing directive #for 9 | #for i in sys.stdin: | ^~~ a.cc:10:9: error: invalid preprocessing directive #a 10 | # a,b=map(int,i.split()) | ^ a.cc:11:9: error: invalid preprocessing directive #print 11 | # print(gcd(a,b),lcm(a,b)) | ^~~~~ a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s544009374
p00007
C++
#include <algorithm> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; int main() { long double a = 100000; int s; cin >> s; for (int i = 0; i < s; i++) { a *= 1.05; } if (a % 1000 == 0) { } else { a = a - (a % 1000); } cout << a; return 0; }
a.cc: In function 'int main()': a.cc:35:15: error: invalid operands of types 'long double' and 'int' to binary 'operator%' 35 | if (a % 1000 == 0) { | ~ ^ ~~~~ | | | | | int | long double a.cc:38:27: error: invalid operands of types 'long double' and 'int' to binary 'operator%' 38 | else { a = a - (a % 1000); } | ~ ^ ~~~~ | | | | | int | long double
s844829948
p00007
C++
#include <iostream> using namespace std; int main() { int n; double money=100; cin >> n; for (size_t i = 0; i < n; i++) { money = money*1.05; money = ceil(money); } cout << money * 1000 << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:25: error: 'ceil' was not declared in this scope 13 | money = ceil(money); | ^~~~
s727322589
p00007
C++
#include<iostream> int week(int money){ money = money + money * 0.05; money = money + 1000 - ( money % 1000 ); return money; } int main(void){ int n; int money = 100000; cin >> n; for(int i = 0;i < n;i++){ money = week(money); } return 0; }
a.cc: In function 'int main()': a.cc:12:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 12 | cin >> n; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~
s659160446
p00007
C++
#include<iostream> using namedspace std; int week(int money){ money = money + money * 0.05; money = money + 1000 - ( money % 1000 ); return money; } int main(void){ int n; int money = 100000; cin >> n; for(int i = 0;i < n;i++){ money = week(money); } return 0; }
a.cc:3:7: error: expected nested-name-specifier before 'namedspace' 3 | using namedspace std; | ^~~~~~~~~~ a.cc: In function 'int main()': a.cc:14:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 14 | cin >> n; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~
s281051942
p00007
C++
#include<iostream> using namedspace std; int week(int money){ money = money + money * 0.05; money = money + 1000 - ( money % 1000 ); return money; } int main(void){ int n; int money = 100000; cin >> n; for(int i = 0;i < n;i++){ money = week(money); } cout << money << endl; return 0; }
a.cc:3:7: error: expected nested-name-specifier before 'namedspace' 3 | using namedspace std; | ^~~~~~~~~~ a.cc: In function 'int main()': a.cc:14:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 14 | cin >> n; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:19:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 19 | cout << money << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:19:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 19 | cout << money << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s236923298
p00007
C++
#include <iostream> int main(){ long long int Debt = 100000; int n; cin >> n; for (int i=0; i<n; i++) Debt = Debt * 1.05; if(Debt % 10000 > 0) Debt = Debt + 10000; return 0; }
a.cc: In function 'int main()': a.cc:7:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin >> n; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~
s022296039
p00007
C++
#include<stdio.h> #include<iostream> using#include<stdio.h> #include<iostream> using namespace std; int main(){ int n=0; int m=100000; cin>>n; for(int i=0;i<n;i++){ m=m*1.05; if(m%1000!=0){ m=m+1000; } } cout<<m<<endl; return 0; }
a.cc:3:6: error: stray '#' in program 3 | using#include<stdio.h> | ^ a.cc:3:7: error: expected nested-name-specifier before 'include' 3 | using#include<stdio.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:9:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 9 | cin>>n; | ^~~ | std::cin In file included from a.cc:2: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:16:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 16 | cout<<m<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:16:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 16 | cout<<m<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s350711729
p00007
C++
include <iostream> # include <stdio.h> # include <math.h> using namespace std; int main() { int n; cin>>n; float newamount=100000; for(int i=0;i<n;i++){ float copy=newamount*21/20; copy=ceil(copy/1000); copy=copy*1000; newamount=copy; } cout<<ceil(newamount); return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ In file included from /usr/include/math.h:275, from /usr/include/c++/14/cmath:47, from /usr/include/c++/14/math.h:36, from a.cc:3: /usr/include/x86_64-linux-gnu/bits/mathcalls.h:382:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 382 | __MATHDECL (__intmax_t, fromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:382:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 382 | __MATHDECL (__intmax_t, fromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:387:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 387 | __MATHDECL (__uintmax_t, ufromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:387:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 387 | __MATHDECL (__uintmax_t, ufromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:393:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 393 | __MATHDECL (__intmax_t, fromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:393:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 393 | __MATHDECL (__intmax_t, fromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:399:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 399 | __MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:399:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 399 | __MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:382:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 382 | __MATHDECL (__intmax_t, fromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:382:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 382 | __MATHDECL (__intmax_t, fromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:387:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 387 | __MATHDECL (__uintmax_t, ufromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:387:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 387 | __MATHDECL (__uintmax_t, ufromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:393:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 393 | __MATHDECL (__intmax_t, fromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:393:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 393 | __MATHDECL (__intmax_t, fromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:399:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 399 | __MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:399:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 399 | __MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:382:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 382 | __MATHDECL (__intmax_t, fromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:382:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 382 | __MATHDECL (__intmax_t, fromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:387:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 387 | __MATHDECL (__uintmax_t, ufromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:387:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 387 | __MATHDECL (__uintmax_t, ufromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:393:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 393 | __MATHDECL (__intmax_t, fromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:393:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 393 | __MATHDECL (__intmax_t, fromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:399:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 399 | __MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:399:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 399 | __MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:382:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 382 | __MATHDECL (__intmax_t, fromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:382:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 382 | __MATHDECL (__intmax_t, fromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:387:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 387 | __MATHDECL (__uintmax_t, ufromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:387:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 387 | __MATHDECL (__uintmax_t, ufromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:393:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 393 | __MATHDECL (__intmax_t, fromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:393:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 393 | __MATHDECL (__intmax_t, fromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:399:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 399 | __MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:399:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 399 | __MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:382:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 382 | __MATHDECL (__intmax_t, fromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:382:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 382 | __MATHDECL (__intmax_t, fromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:387:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 387 | __MATHDECL (__uintmax_t, ufromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:387:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 387 | __MATHDECL (__uintmax_t, ufromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:393:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 393 | __MATHDECL (__intmax_t, fromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:393:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 393 | __MATHDECL (__intmax_t, fromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:399:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 399 | __MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:399:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 399 | __MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:382:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 382 | __MATHDECL (__intmax_t, fromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:382:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 382 | __MATHDECL (__intmax_t, fromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:387:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 387 | __MATHDECL (__uintmax_t, ufromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:387:1: error: '__uintmax_t' does not name a type; did you mean '__uint128_t'? 387 | __MATHDECL (__uintmax_t, ufromfp,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:393:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 393 | __MATHDECL (__intmax_t, fromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:393:1: error: '__intmax_t' does not name a type; did you mean '__int128_t'? 393 | __MATHDECL (__intmax_t, fromfpx,, (_Mdouble_ __x, int __round, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/bits/mathcalls.h:399:1: error: '__uintmax_t' does not name a type; did you m
s695201944
p00007
C++
#include <stdio.h> int main(void) { int a,c,i; int b; scanf_s("%d", &a); b = 100000; for (i = 0; i < a; i++) { b = b * 1.05; } c = b % 10000; if (c!=0) { b = b + 10000-c; } printf("%d", b); return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 5 | scanf_s("%d", &a); | ^~~~~~~ | scanf
s082443790
p00007
C++
#include<iostream> using namespace std; int main(){ int n; int money = 100000; for(int i = 0; i < n; ++i){ maney = money + (money * 0.05); if(money % 1000 != 0){ money += 1000; } } cout << money << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:3: error: 'maney' was not declared in this scope; did you mean 'money'? 9 | maney = money + (money * 0.05); | ^~~~~ | money
s107460200
p00007
C++
#include <iostream> #include <vector> #include <math.h> #include <string> #include <windows.h> int main(void); int kiriage(int num); int main(){ int n; //n週 int debut = 100000; //借金 std::cin >> n; for (int i = 0; i < n; i++) { debut *= 1.05; std::string str_debut = std::to_string(debut); if ((str_debut[str_debut.length() - 1] == '0') && (str_debut[str_debut.length() - 2] == '0') && (str_debut[str_debut.length() - 3] == '0') ){ ; } else{ debut = kiriage(debut); } } std::cout << debut << std::endl; //while (1); return 0; } //1000円未満を切り上げる関数 int kiriage(int num){ num = num / 1000 * 1000 + 1000; return num; }
a.cc:5:10: fatal error: windows.h: No such file or directory 5 | #include <windows.h> | ^~~~~~~~~~~ compilation terminated.
s683159205
p00007
C++
#include <iostream> #include <vector> #include <math.h> #include <string> #include <windows.h> int main(void); int kiriage(int num); int main(){ int n; //n週 int debut = 100000; //借金 std::cin >> n; for (int i = 0; i < n; i++) { debut *= 1.05; std::string str_debut = std::to_string(debut); if ((str_debut[str_debut.length() - 1] == '0') && (str_debut[str_debut.length() - 2] == '0') && (str_debut[str_debut.length() - 3] == '0') ){ ; } else{ debut = kiriage(debut); } } std::cout << debut << std::endl; //while (1); return 0; } //1000円未満を切り上げる関数 int kiriage(int num){ num = num / 1000 * 1000 + 1000; return num; }
a.cc:5:10: fatal error: windows.h: No such file or directory 5 | #include <windows.h> | ^~~~~~~~~~~ compilation terminated.
s262109163
p00007
C++
#include <iostream> using namespace std; int main(){ int n; cin>>n; int temp = 0,k; for(int i = 0; i < n; i++){ k = (int)(sum * 0.05) % 1000; if(k != 0) temp = 1000; else temp = 0; sum += sum * 0.05 + temp - k; } cout<<sum<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:19: error: 'sum' was not declared in this scope 9 | k = (int)(sum * 0.05) % 1000; | ^~~ a.cc:16:11: error: 'sum' was not declared in this scope 16 | cout<<sum<<endl; | ^~~
s493865039
p00007
C++
#include<iostream> using namespace std; int main() { int d = 100000; int n; cin >> n; while(n > 0; n--) { d *= 1.05; if(d % 1000) { d = (d / 1000 + 1) * 1000; } } cout << d << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:16: error: expected ')' before ';' token 8 | while(n > 0; n--) { | ~ ^ | ) a.cc:8:21: error: expected ';' before ')' token 8 | while(n > 0; n--) { | ^ | ;
s868381950
p00007
C++
#include <iostream> #include <cstdio> #include <cstring> using namespace std; long int kane(int k){ long int shakkin = 100000; for(int i=0;i<k;i++){ shakkin = shakkin*1.05; if(shakkin%1000!=0) shakkin += 1000-(shakkin%1000); } return shakkin; } int main() { int n; cin >> n; cout << kane(n) <<endl; return 0; }
a.cc:19:24: error: extended character   is not valid in an identifier 19 | cout << kane(n) <<endl; | ^ a.cc: In function 'int main()': a.cc:19:24: error: expected ';' before '\U00003000' 19 | cout << kane(n) <<endl; | ^~ | ;
s277002250
p00007
C++
p=100000;main(a){for(scanf("%d",&a);a--;p=(p/1000+(p%1000?1:0))*1000)p+=p/20;printf("%d",p);}
a.cc:1:1: error: 'p' does not name a type 1 | p=100000;main(a){for(scanf("%d",&a);a--;p=(p/1000+(p%1000?1:0))*1000)p+=p/20;printf("%d",p);} | ^ a.cc:1:14: error: expected constructor, destructor, or type conversion before '(' token 1 | p=100000;main(a){for(scanf("%d",&a);a--;p=(p/1000+(p%1000?1:0))*1000)p+=p/20;printf("%d",p);} | ^
s783998611
p00007
C++
import java.util.*;class Main{public static void main(String[]a){System.out.println(f(new Scanner(System.in).nextInt())*1000);}static int f(int n){return n<1?100:(int)Math.ceil(f(n-1)*1.05);}}
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*;class Main{public static void main(String[]a){System.out.println(f(new Scanner(System.in).nextInt())*1000);}static int f(int n){return n<1?100:(int)Math.ceil(f(n-1)*1.05);}} | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:1:37: error: expected ':' before 'static' 1 | import java.util.*;class Main{public static void main(String[]a){System.out.println(f(new Scanner(System.in).nextInt())*1000);}static int f(int n){return n<1?100:(int)Math.ceil(f(n-1)*1.05);}} | ^~~~~~~ | : a.cc:1:55: error: 'String' has not been declared 1 | import java.util.*;class Main{public static void main(String[]a){System.out.println(f(new Scanner(System.in).nextInt())*1000);}static int f(int n){return n<1?100:(int)Math.ceil(f(n-1)*1.05);}} | ^~~~~~ a.cc:1:63: error: expected ',' or '...' before 'a' 1 | import java.util.*;class Main{public static void main(String[]a){System.out.println(f(new Scanner(System.in).nextInt())*1000);}static int f(int n){return n<1?100:(int)Math.ceil(f(n-1)*1.05);}} | ^ a.cc:1:193: error: expected ';' after class definition 1 | import java.util.*;class Main{public static void main(String[]a){System.out.println(f(new Scanner(System.in).nextInt())*1000);}static int f(int n){return n<1?100:(int)Math.ceil(f(n-1)*1.05);}} | ^ | ; a.cc: In static member function 'static void Main::main(int*)': a.cc:1:66: error: 'System' was not declared in this scope 1 | import java.util.*;class Main{public static void main(String[]a){System.out.println(f(new Scanner(System.in).nextInt())*1000);}static int f(int n){return n<1?100:(int)Math.ceil(f(n-1)*1.05);}} | ^~~~~~ a.cc:1:91: error: expected type-specifier before 'Scanner' 1 | import java.util.*;class Main{public static void main(String[]a){System.out.println(f(new Scanner(System.in).nextInt())*1000);}static int f(int n){return n<1?100:(int)Math.ceil(f(n-1)*1.05);}} | ^~~~~~~ a.cc: In static member function 'static int Main::f(int)': a.cc:1:168: error: 'Math' was not declared in this scope 1 | import java.util.*;class Main{public static void main(String[]a){System.out.println(f(new Scanner(System.in).nextInt())*1000);}static int f(int n){return n<1?100:(int)Math.ceil(f(n-1)*1.05);}} | ^~~~
s750303249
p00007
C++
#include <iostream> using namespace std; int main(){ int n; scanf("%d",&n); double base = 100000; for(int i=0;i<n;i++){ base*=1.05; } printf("%d\n,(int)base); }
a.cc:10:8: warning: missing terminating " character 10 | printf("%d\n,(int)base); | ^ a.cc:10:8: error: missing terminating " character 10 | printf("%d\n,(int)base); | ^~~~~~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:11:1: error: expected primary-expression before '}' token 11 | } | ^
s593952828
p00007
C++
import java.util.Scanner; public class Main { public static void main(String arg[]) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int de = 100000; for(int i=0; i<n; i++) { de = de / 100; de = de * 105; if(de%1000 != 0) de += 1000; de = de/1000; de = de*1000; } System.out.println(de); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main | ^~~~~~
s785664926
p00007
C++
#include<iostream> #include<cmath> int main(){ double yami = 100.000; int n; std::cin >> n; for(int i = 0;i < n; ++i){ yami += yami / 20.000; if(ceil(yami) != floor(yami)){ yami = ceil(yami); } } std::cout << yami * 1000 << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:37: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 13 | std::cout << yami * 1000 << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s475105656
p00007
C++
#include <iostream> using namespace std; int main() { int n,a = 100000; cin >> n; for(int i=0;i<=n;i++) { a *= 1.05; a += 1000-cur%1000; } cout << a << endl; }
a.cc: In function 'int main()': a.cc:12:23: error: 'cur' was not declared in this scope 12 | a += 1000-cur%1000; | ^~~
s140161799
p00007
C++
#include <iostream> using namespace std; int main() { int n,a = 100000; cin >> n; for(int i=0;i<=n;i++) { a *= 1.05; if(a%1000) a += 1000-cur%1000; } cout << a << endl; }
a.cc: In function 'int main()': a.cc:12:23: error: 'cur' was not declared in this scope 12 | a += 1000-cur%1000; | ^~~
s320004733
p00007
C++
#include <iostream> using namespace std; int main() { int n,a = 100000; cin >> n; for(int i=0;i<n;i++) { a *= 1.05; a += 1000-a%1000; } cout << cur << endl; }
a.cc: In function 'int main()': a.cc:15:13: error: 'cur' was not declared in this scope 15 | cout << cur << endl; | ^~~
s607003304
p00007
C++
#include <iostream> using namespace std; int main() { int n,a = 100000; cin >> n; for(int i=0;i<n;i++) { a *= 1.05; if(a%1000) { a += 1000-a%1000; } } cout << cur << endl; }
a.cc: In function 'int main()': a.cc:17:13: error: 'cur' was not declared in this scope 17 | cout << cur << endl; | ^~~
s647905147
p00007
C++
#i#include <iostream> using namespace std; int main(){ int week,a,b,ans,aans; cin>>week; a=100000*0.05; b=week+1; a*=b; ans=100000+a; aans=ans/1000; aans=ans*1000; if(aans!=ans)ans+100; cout<<ans<<endl; }
a.cc:1:2: error: invalid preprocessing directive #i; did you mean #if? 1 | #i#include <iostream> | ^ | if a.cc: In function 'int main()': a.cc:6:9: error: 'cin' was not declared in this scope 6 | cin>>week; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #i#include <iostream> a.cc:14:9: error: 'cout' was not declared in this scope 14 | cout<<ans<<endl; | ^~~~ a.cc:14:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:14:20: error: 'endl' was not declared in this scope 14 | cout<<ans<<endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | #i#include <iostream>
s994703634
p00007
C++
#include<iostream> using namespace std; int main(){ double n; cin >> m; n = 100000; for(int i=0;i<m;i++){ n = n * 1.05; } if(n%1000 > 0) { n = n/1000*1000+1000; } cout << (int)n; return 0; }
a.cc: In function 'int main()': a.cc:6:12: error: 'm' was not declared in this scope 6 | cin >> m; | ^ a.cc:11:9: error: invalid operands of types 'double' and 'int' to binary 'operator%' 11 | if(n%1000 > 0) | ~^~~~~ | | | | | int | double
s346766155
p00007
C++
#include<iostream> using namespace std; int main(){ int n; cin >> m; n = 100000; for(int i=0;i<m;i++){ n = n * 1.05; } if(n%1000 > 0) { n = n/1000*1000+1000; } cout << n; return 0; }
a.cc: In function 'int main()': a.cc:6:12: error: 'm' was not declared in this scope 6 | cin >> m; | ^
s126975419
p00007
C++
#include<iostream> using namespace std; int main(void){ int n, ans = 100000; cin >> n; for(i = 0; i < n; i++){ ans = ans * 1.05; if(ans % 1000 != 0); ans = ans - ans % 1000 + 10000; } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: 'i' was not declared in this scope 7 | for(i = 0; i < n; i++){ | ^
s059696926
p00007
C++
#include <iostream> #include <string> using namespace std; int main(){ int a; a=100000; int b; b=0; while(b<n){ a=a/20*21/1000*1000; b=b+1;} cout << a<<endl; }
a.cc: In function 'int main()': a.cc:10:9: error: 'n' was not declared in this scope 10 | while(b<n){ | ^
s756821565
p00007
C++
#include <iostream> using namespace std; int main() { const double rate = 1.05; int n; while (cin >> n) { double debt = 100; // 100kYen for (int i = 0; i < n; ++i) { debt = ceil(debt * rate); } cout << debt << "000" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:14:32: error: 'ceil' was not declared in this scope 14 | debt = ceil(debt * rate); | ^~~~
s737289034
p00007
C++
#include<iostream> #include<stdio.h> using namespace std; int n; double rent = 100000; int main() { cin>>n; for(int i=0;i<n;i++) { rent = rent * 1.05 ; if( rent % 1000 != 0) rent = rent + 1000; } printf("%.0lf\n",rent); return 0; }
a.cc: In function 'int main()': a.cc:14:27: error: invalid operands of types 'double' and 'int' to binary 'operator%' 14 | if( rent % 1000 != 0) | ~~~~ ^ ~~~~ | | | | double int
s504887306
p00007
C++
#include <stdio.h> int main(){ int n; double debt=100000; scanf("%d",&n); while(n--){ debt += debt*0.05; if(debt%1000!=0){ debt -= debt%1000; debt += 1000; } } printf("%lf\n",debt); return 0; }
a.cc: In function 'int main()': a.cc:8:11: error: invalid operands of types 'double' and 'int' to binary 'operator%' 8 | if(debt%1000!=0){ | ~~~~^~~~~ | | | | | int | double a.cc:9:18: error: invalid operands of types 'double' and 'int' to binary 'operator%' 9 | debt -= debt%1000; | ~~~~^~~~~ | | | | | int | double
s401350348
p00007
C++
#include <stdio.h> int main(){ int n; double debt=100000.0; scanf("%d",&n); while(n--){ debt += debt*0.05; if(debt%1000!=0){ debt -= debt%1000; debt += 1000; } } printf("%lf\n",debt); return 0; }
a.cc: In function 'int main()': a.cc:8:12: error: invalid operands of types 'double' and 'int' to binary 'operator%' 8 | if(debt%1000!=0){ | ~~~~^~~~~ | | | | | int | double a.cc:9:19: error: invalid operands of types 'double' and 'int' to binary 'operator%' 9 | debt -= debt%1000; | ~~~~^~~~~ | | | | | int | double
s872519840
p00007
C++
#include <stdio.h> int main(){ int n; double debt=100000; scanf("%d",&n); while(n--){ debt += debt*0.05; if((int)debt%1000!=0){ debt -= debt%1000; debt += 1000; } } printf("%lf\n",debt); return 0; }
a.cc: In function 'int main()': a.cc:9:18: error: invalid operands of types 'double' and 'int' to binary 'operator%' 9 | debt -= debt%1000; | ~~~~^~~~~ | | | | | int | double
s731725103
p00007
C++
p 13530000
a.cc:1:1: error: 'p' does not name a type 1 | p 13530000 | ^
s259668376
p00007
C++
using System; class main { static void Main(String[] args) { double n = double.Parse(Console.ReadLine()); double b = 100000; for (int i = 0; i < n; i++) { b = b * 1.05; b = (Math.Ceiling(b / 1000))*1000; } Console.WriteLine(b); } }
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:4:22: error: 'String' has not been declared 4 | static void Main(String[] args) | ^~~~~~ a.cc:4:31: error: expected ',' or '...' before 'args' 4 | static void Main(String[] args) | ^~~~ a.cc:15:2: error: expected ';' after class definition 15 | } | ^ | ; a.cc: In static member function 'static void main::Main(int*)': a.cc:6:20: error: expected primary-expression before 'double' 6 | double n = double.Parse(Console.ReadLine()); | ^~~~~~ a.cc:11:18: error: 'Math' was not declared in this scope 11 | b = (Math.Ceiling(b / 1000))*1000; | ^~~~ a.cc:13:9: error: 'Console' was not declared in this scope 13 | Console.WriteLine(b); | ^~~~~~~
s944209084
p00007
C++
using System; class main { static void Main(String[] args) { double n = double.Parse(Console.ReadLine()); double b = 100000; for (int i = 0; i < n; i++) { b = b * 1.05; b = (Math.Ceiling(b / 1000))*1000; } Console.WriteLine(b); //Console.ReadKey(); } }
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:5:22: error: 'String' has not been declared 5 | static void Main(String[] args) | ^~~~~~ a.cc:5:31: error: expected ',' or '...' before 'args' 5 | static void Main(String[] args) | ^~~~ a.cc:17:2: error: expected ';' after class definition 17 | } | ^ | ; a.cc: In static member function 'static void main::Main(int*)': a.cc:7:20: error: expected primary-expression before 'double' 7 | double n = double.Parse(Console.ReadLine()); | ^~~~~~ a.cc:12:18: error: 'Math' was not declared in this scope 12 | b = (Math.Ceiling(b / 1000))*1000; | ^~~~ a.cc:14:9: error: 'Console' was not declared in this scope 14 | Console.WriteLine(b); | ^~~~~~~
s788857403
p00007
C++
#include <iostream> int main(){ int n,debt=100000; for(int i=0;i<(std::cin>>n);i++) debt*=1.05; std::cout<<(debt%1000 ? debt/1000*1000+1000 : debt)<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:5:22: error: no match for 'operator<' (operand types are 'int' and 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'}) 5 | for(int i=0;i<(std::cin>>n);i++) debt*=1.05; | ~^~~~~~~~~~~~~~ | | | | int std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} a.cc:5:22: note: candidate: 'operator<(int, int)' (built-in) 5 | for(int i=0;i<(std::cin>>n);i++) debt*=1.05; | ~^~~~~~~~~~~~~~ a.cc:5:22: note: no known conversion for argument 2 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:5:35: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int' 5 | for(int i=0;i<(std::cin>>n);i++) debt*=1.05; | ^ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:5:35: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int' 5 | for(int i=0;i<(std::cin>>n);i++) debt*=1.05; | ^ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:5:35: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int' 5 | for(int i=0;i<(std::cin>>n);i++) debt*=1.05; | ^ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:5:35: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int' 5 | for(int i=0;i<(std::cin>>n);i++) debt*=1.05; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:5:35: note: mismatched types 'const std::pair<_T1, _T2>' and 'int' 5 | for(int i=0;i<(std::cin>>n);i++) debt*=1.05; | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:5:35: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 5 | for(int i=0;i<(std::cin>>n);i++) debt*=1.05; | ^ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:5:35: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 5 | for(int i=0;i<(std::cin>>n);i++) debt*=1.05; | ^ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:5:35: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 5 | for(int i=0;i<(std::cin>>n);i++) debt*=1.05; | ^ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:5:35: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int' 5 | for(int i=0;i<(std::cin>>n);i++) debt*=1.05; | ^ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed: a.cc:5:35: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int' 5 | for(int i=0;i<(std::cin>>n);i++) debt*=1.05; | ^ /usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3901 | operator<(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed: a.cc:5:35: note: mismatched types 'const _CharT*' and 'int' 5 | for(int i=0;i<(std::cin>>n);i++) debt*=1.05; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:5:35: note: mismatched types 'const std::tuple<_UTypes ...>' and 'int' 5 | for(int i=0;i<(std::cin>>n);i++) debt*=1.05; | ^ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ^~~~~~~~ /usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'int' to 'const std::error_code&' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)' 507 | operator<(const error_condition& __lhs, | ^~~~~~~~ /usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'int' to 'const std::error_condition&' 507 | operator<(const error_condition& __lhs, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
s161230605
p00007
C++
#include <iostream> int main(){ int n,debt=100000; for(int i=0,cin>>n;i<n;i++) debt*=1.05; std::cout<<(debt%1000 ? debt/1000*1000+1000 : debt)<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:5:24: error: expected ';' before '>>' token 5 | for(int i=0,cin>>n;i<n;i++) debt*=1.05; | ^~ | ; a.cc:5:24: error: expected primary-expression before '>>' token 5 | for(int i=0,cin>>n;i<n;i++) debt*=1.05; | ^~ a.cc:5:31: error: expected ')' before ';' token 5 | for(int i=0,cin>>n;i<n;i++) debt*=1.05; | ~ ^ | ) a.cc:5:32: error: 'i' was not declared in this scope 5 | for(int i=0,cin>>n;i<n;i++) debt*=1.05; | ^
s816868906
p00007
C++
#include <iostream> int main(){ int n,debt=100000; cin>>n; for(int i=0;i<n;i++) debt*=1.05; std::cout<<(debt%1000 ? debt/1000*1000+1000 : debt)<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>n; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~
s913905764
p00007
C++
#include <iostream> int main(){ int n,debt=100000; for(int i=0,std::cin>>n;i<n;i++) debt*=1.05; std::cout<<(debt%1000 ? debt/1000*1000+1000 : debt)<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:5:29: error: qualified-id in declaration before '>>' token 5 | for(int i=0,std::cin>>n;i<n;i++) debt*=1.05; | ^~ a.cc:5:29: error: expected ';' before '>>' token 5 | for(int i=0,std::cin>>n;i<n;i++) debt*=1.05; | ^~ | ; a.cc:5:29: error: expected primary-expression before '>>' token 5 | for(int i=0,std::cin>>n;i<n;i++) debt*=1.05; | ^~ a.cc:5:36: error: expected ')' before ';' token 5 | for(int i=0,std::cin>>n;i<n;i++) debt*=1.05; | ~ ^ | ) a.cc:5:37: error: 'i' was not declared in this scope 5 | for(int i=0,std::cin>>n;i<n;i++) debt*=1.05; | ^
s440437915
p00007
C++
#include <iostream> int main(){ int n,debt=100000; std::cin>>n; for(int i=0;i<n;i++){ debt*=1.05; debt=debt%1000 ? debt/1000*1000+1000 : debt } std::cout<<debt<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:8:60: error: expected ';' before '}' token 8 | debt=debt%1000 ? debt/1000*1000+1000 : debt | ^ | ; 9 | } | ~
s098438637
p00007
C++
#include "stdafx.h" #include <iostream> using namespace std; int main(){ int i,n=100000,m; cin >> i; while(i--){ n+=n*0.05; m=n%1000; if(m){ n+=1000-m; } } cout << n << endl; return 0; }
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s687487212
p00007
C++
#include <iostream> using namespace std; int main() { double d = 100000.0; int n; cin >> n; for(int i=0; i<n; i++){ d *= 1.05; d /= 1000.0; d = ceil(d); d *= 1000; } cout << (int)d << '\n'; }
a.cc: In function 'int main()': a.cc:12:21: error: 'ceil' was not declared in this scope 12 | d = ceil(d); | ^~~~
s839070277
p00007
C++
#include<iostream> int main(){ int n; double sum=100000; std::cin>>n; for(int i=0;i<n;i++){ sum*=1.05; sum/=1000; sum=std::ceil(sum); sum*=1000; } std::cout<<sum<<std::endl; return 0; }
a.cc: In function 'int main()': a.cc:10:26: error: 'ceil' is not a member of 'std' 10 | sum=std::ceil(sum); | ^~~~
s085338265
p00008
Java
import java.util.Scanner; public class main { public static void main(String[] args) { Scanner in = new Scanner(System.in); while(in.hasNext()){ System.out.println(solve(in.nextInt())); } } static int solve(int n){ int res = 0; 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++){ res += (i+j+k+l == n) ? 1 : 0; } return res; } }
Main.java:3: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s316136651
p00008
Java
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); while(sc.hasNextInt()){ int n=sc.nectInt(); int num=0; for(int a=0;a<=9;a++){ for(int b=0;b<=9;b++){ for(int c=0;c<=9;c++){ if(binary_search(n-a-b-c)){ num++; } } } } System.out.println(num); } } public static boolean binary_search(int x){ int n=new int[10]; for(int a=0;a<=9;a++){ n[a]=a } int l=0; int r=10; while(r-l>=1){ int i=l+r/2; if(x==a[i]){ return true; } else if(x>a[i]){ l=i+1; } else if(x<a[i]){ r=i; } } return false; } }
Main.java:24: error: ';' expected n[a]=a ^ 1 error
s632139086
p00008
Java
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); while(sc.hasNextInt()){ int n=sc.nectInt(); int num=0; for(int a=0;a<=9;a++){ for(int b=0;b<=9;b++){ for(int c=0;c<=9;c++){ if(binary_search(n-a-b-c)){ num++; } } } } System.out.println(num); } } public static boolean binary_search(int x){ int n=new int[10]; for(int a=0;a<=9;a++){ n[a]=a; } int l=0; int r=10; while(r-l>=1){ int i=l+r/2; if(x==a[i]){ return true; } else if(x>a[i]){ l=i+1; } else if(x<a[i]){ r=i; } } return false; } }
Main.java:7: error: cannot find symbol int n=sc.nectInt(); ^ symbol: method nectInt() location: variable sc of type Scanner Main.java:22: error: incompatible types: int[] cannot be converted to int int n=new int[10]; ^ Main.java:24: error: array required, but int found n[a]=a; ^ Main.java:30: error: cannot find symbol if(x==a[i]){ ^ symbol: variable a location: class Main Main.java:33: error: cannot find symbol else if(x>a[i]){ ^ symbol: variable a location: class Main Main.java:36: error: cannot find symbol else if(x<a[i]){ ^ symbol: variable a location: class Main 6 errors
s052462367
p00008
Java
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); while(sc.hasNextInt()){ int n=sc.nextInt(); int num=0; for(int a=0;a<=9;a++){ for(int b=0;b<=9;b++){ for(int c=0;c<=9;c++){ if(binary_search(n-a-b-c)){ num++; } } } } System.out.println(num); } } public static boolean binary_search(int x){ int[] n=new int[10]; for(int a=0;a<=9;a++){ n[a]=a; } int l=0; int r=10; while(r-l>=1){ int i=l+r/2; if(x==a[i]){ return true; } else if(x>a[i]){ l=i+1; } else if(x<a[i]){ r=i; } } return false; } }
Main.java:30: error: cannot find symbol if(x==a[i]){ ^ symbol: variable a location: class Main Main.java:33: error: cannot find symbol else if(x>a[i]){ ^ symbol: variable a location: class Main Main.java:36: error: cannot find symbol else if(x<a[i]){ ^ symbol: variable a location: class Main 3 errors
s528200639
p00008
Java
public class Demo{ public int sumAll(int...numbers){ int result = 0; for(int i = 0 ; i<numbers.length;i++){ result+=numbers[i]; } return result; } }
Main.java:1: error: class Demo is public, should be declared in a file named Demo.java public class Demo{ ^ 1 error
s249589525
p00008
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ List<Integer> list = new ArrayList<Integer>(); int cnt = 0; while(scan.hasNext()){ 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++; } } } } } list.add(cnt); } for(int n : list){ System.out.printf("%d\n", n); } } }
Main.java:14: error: cannot find symbol if(i + j + k + l == n){ ^ symbol: variable n location: class Main 1 error
s656455401
p00008
Java
import java.util.Scanner; public class vol0_0008 { public static void main(String[] a) { final int max = 10; Scanner scn = new Scanner(System.in); int n = scn.nextInt(); long ans = 0; for (int w = 0; w < max; w++) { if(n - w > (max - 1) * 3)continue; for (int x = w; x < max; x++) { if(n - w - x > (max - 1) * 2)continue; for (int y = x; y < max; y++) { if(n - w - x - y > (max - 1))continue; int z = n - w - x - y; if(w == x && x == y && y == z){ ans +=1; }else{ if((w == x && x == y)||(w == x && x == z)||(w == y && y == z)||(x == y && y == z)){ ans += 4; }else{ if((w == x && y == z)||(w == y && x == z)||(w == z && y == x)){ ans += 6; }else{ if((w == x)||(w == y)||(w == z)||(x == y)||(x == z)||(y == z)){ ans += 12; }else{ ans += 24; } } } } } } } System.out.println(ans); } }
Main.java:3: error: class vol0_0008 is public, should be declared in a file named vol0_0008.java public class vol0_0008 { ^ 1 error
s016475535
p00008
Java
import java.util.Scanner; public class Sumof4Integers { public static void main(String[] args) { int aList[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; int bList[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; int cList[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; int dList[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; try (Scanner scan = new Scanner(System.in)) { String inDataStr; while ((inDataStr = scan.nextLine()) != null && !"".equals(inDataStr)) { int inData = Integer.parseInt(inDataStr); int combi = 0; for (int a : aList) { for (int b : bList) { for (int c : cList) { for (int d : dList) { if (a + b + c + d == inData) { combi++; } } } } } System.out.println(combi); } } catch (Exception e) { System.exit(0); } } }
Main.java:3: error: class Sumof4Integers is public, should be declared in a file named Sumof4Integers.java public class Sumof4Integers { ^ 1 error
s774923475
p00008
Java
import java.util.Scanner; import volume0.BaseExe; public class Work extends BaseExe { public static void main(String[] args) { new Work().exeSysIn(); } @Override protected void execute(Scanner scan) { int[] num = new int[51]; for (int a = 0; a <= 9; a++) for (int b = 0; b <= 9; b++) for (int c = 0; c <= 9; c++) for (int d = 0; d <= 9; d++) num[a + b + c + d]++; String ln = ""; while (scan.hasNextLine() && !"".equals(ln = scan.nextLine())) System.out.println(num[Integer.parseInt(ln)]); } }
Main.java:4: error: class Work is public, should be declared in a file named Work.java public class Work extends BaseExe { ^ Main.java:2: error: package volume0 does not exist import volume0.BaseExe; ^ Main.java:4: error: cannot find symbol public class Work extends BaseExe { ^ symbol: class BaseExe Main.java:7: error: cannot find symbol new Work().exeSysIn(); ^ symbol: method exeSysIn() location: class Work Main.java:10: error: method does not override or implement a method from a supertype @Override ^ 5 errors
s786103551
p00008
Java
public class Mian { public static void main(String[] args) { int count = 0; int n = new java.util.Scanner(System.in).nextInt(); 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) { count++; } } } } } System.out.println(count); } }
Main.java:1: error: class Mian is public, should be declared in a file named Mian.java public class Mian { ^ 1 error
s175447713
p00008
Java
public class Mian { public static void main(String[] args) { int count = 0; int n = new java.util.Scanner(System.in).nextInt(); 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) { count++; } } } } } System.out.println(count); } }
Main.java:1: error: class Mian is public, should be declared in a file named Mian.java public class Mian { ^ 1 error
s523874462
p00008
Java
public class Mian { static int n = new java.util.Scanner(System.in).nextInt(); public static void main(String[] args) { int count = 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) { count++; } } } } } System.out.println(count); } }
Main.java:1: error: class Mian is public, should be declared in a file named Mian.java public class Mian { ^ 1 error
s493911720
p00008
Java
public class Mian { static int n = new java.util.Scanner(System.in).nextInt(); static int count = 0; public static void main(String[] args) { 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) { count++; } } } } } System.out.println(count); } }
Main.java:1: error: class Mian is public, should be declared in a file named Mian.java public class Mian { ^ 1 error
s736743158
p00008
Java
import java.util.Scanner; class Problem { public static int sumOf4Int(int n){ int count = 0; if(n > 36){ return 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) count++; } } } } return count; } public static void main(String[] args){ System.out.println(sumOf4Int(args[1])); } }
Main.java:24: error: incompatible types: String cannot be converted to int System.out.println(sumOf4Int(args[1])); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 1 error