submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s043828337
p00013
C++
#define _CRT_SECURE_NO_WARNINGS #include <vector> #include <iostream> using namespace std; int main() { int in; vector <int> a; while (cin >> in;) { if (in == 0) { cout << a.back(); a.pop_back(); /*if (a.size() == 0) break; else*/ cout << endl; } else a.push_back(in); } return 0; }
a.cc: In function 'int main()': a.cc:9:25: error: expected ')' before ';' token 9 | while (cin >> in;) { | ~ ^ | ) a.cc:9:26: error: expected primary-expression before ')' token 9 | while (cin >> in;) { | ^
s719794723
p00013
C++
#include <cstdio> #include <stack> using namespace std; int main(){ int n; stack<int> car; while(scanf("%d",&n)!) { if(n!=0) car.push(n); else{ printf("%d\n",car.top()); car.pop(); } } return 0; }
a.cc: In function 'int main()': a.cc:7:29: error: expected ')' before '!' token 7 | while(scanf("%d",&n)!) { | ~ ^ | ) a.cc:7:30: error: expected primary-expression before ')' token 7 | while(scanf("%d",&n)!) { | ...
s805242499
p00013
C++
#include <iostream> #include <stack> using namespace std; int main() { int n, count = 0, a[10], i; stack<int> s; while (cin >> n,n>=0,!cin.eof()) { if (n > 0) s.push(n); else if (n == 0) { a[count] = s.top(); s.pop(); count++} } for (i = 0; i < count; i++) { cout << a[i] << endl; } }
a.cc: In function 'int main()': a.cc:10:72: error: expected ';' before '}' token 10 | else if (n == 0) { a[count] = s.top(); s.pop(); count++} | ^ | ...
s677828416
p00013
C++
#include <stack> using namespace std; int main() { stack<int> s; int k; while (cin >> k){ if (0 == k){ k = s.top(); s.pop(); cout << k << "\n"; } else s.push(k); } return 0; }
a.cc: In function 'int main()': a.cc:7:16: error: 'cin' was not declared in this scope 7 | while (cin >> k){ | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <stack> +++ |+#include <iostream> ...
s113345232
p00013
C++
#include <iostream> #include <stack> int main(){ std::stack<int> train; int buf; while(std::cin >> buf){ if(buf == 0){ std::cout << train.top() << endl; train.pop(); }else{ train.push(buf); } } return 0; }
a.cc: In function 'int main()': a.cc:14:53: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 14 | std::cout << train.top() << endl; | ^~~~ | std::endl In ...
s294461286
p00013
C++
#include <iostream> int main(){ std::stack<int> railroad; int incar; while(std::cin >> incar){ if(incar != 0){ railroad.push(incar); }else{ std::cout << railroad.top() << std::endl; railroad.pop(); } } return 0; }
a.cc: In function 'int main()': a.cc:4:14: error: 'stack' is not a member of 'std' 4 | std::stack<int> railroad; | ^~~~~ a.cc:2:1: note: 'std::stack' is defined in header '<stack>'; this is probably fixable by adding '#include <stack>' 1 | #include <iostream> +++ |+#include <stack> ...
s424828238
p00013
C++
#include <iostream> #include <deque> int main(){ std::deque<int> que; int tmp; while(std::cin >> tmp){ if(tmp == 0) std::cout << que.pop() << std::endl; else que.push(tmp); } return 0; }
a.cc: In function 'int main()': a.cc:8:47: error: 'class std::deque<int>' has no member named 'pop' 8 | if(tmp == 0) std::cout << que.pop() << std::endl; | ^~~ a.cc:9:26: error: 'class std::deque<int>' has no member named 'push' 9 | ...
s634374541
p00013
C++
#include <iostream> #include <deque> int main(){ std::deque<int> que; int tmp; while(std::cin >> tmp){ if(tmp == 0) std::cout << que.pop() << std::endl; else que.push(tmp); } return 0; }
a.cc: In function 'int main()': a.cc:8:47: error: 'class std::deque<int>' has no member named 'pop' 8 | if(tmp == 0) std::cout << que.pop() << std::endl; | ^~~ a.cc:9:26: error: 'class std::deque<int>' has no member named 'push' 9 | ...
s431300656
p00013
C++
#include <iostream> #include <deque> int main(){ std::deque<int> que; int tmp; while(std::cin >> tmp){ if(tmp == 0) std::cout << que.pop_back() << std::endl; else que.push_back(tmp); } return 0; }
a.cc: In function 'int main()': a.cc:8:40: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'void') 8 | if(tmp == 0) std::cout << que.pop_back() << std::endl; | ~~~~~~~~~ ^~ ~~~~~~~~~~~~~~ | ...
s490399137
p00013
C++
#include <iostream> #include <deque> int main(){ std::deque<int> que; int tmp; while(std::cin >> tmp){ if(tmp == 0) std::cout << que.pop_back() << std::endl; else que.push_back(tmp); } return 0; }
a.cc: In function 'int main()': a.cc:8:40: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'void') 8 | if(tmp == 0) std::cout << que.pop_back() << std::endl; | ~~~~~~~~~ ^~ ~~~~~~~~~~~~~~ | ...
s262522718
p00013
C++
q=[];require("fs").readFileSync("/dev/stdin","utf8").trim().split('\n').map(function(i){i?q.push(i):console.log(q.pop())})
a.cc:1:1: error: 'q' does not name a type 1 | q=[];require("fs").readFileSync("/dev/stdin","utf8").trim().split('\n').map(function(i){i?q.push(i):console.log(q.pop())}) | ^ a.cc:1:13: error: expected constructor, destructor, or type conversion before '(' token 1 | q=[];require("fs").readFileSync("/dev/std...
s583765288
p00013
C++
#include<stdio.h> int main(){ int a[100]; int j; for(int i=0;;i++){ scanf("%d",&a[i]); if(a[i]==0){ j=i; while(){ if(j1!=0){ printf("%d",a[j1]); break; } j--; } } }
a.cc: In function 'int main()': a.cc:9:7: error: expected primary-expression before ')' token 9 | while(){ | ^ a.cc:10:4: error: 'j1' was not declared in this scope; did you mean 'j'? 10 | if(j1!=0){ | ^~ | j a.cc:17:2: error: expected '}' at end of input 17 | } | ^ a.cc:2...
s435342510
p00013
C++
#include<stdio.h> int main(){ int a[100]; int j; for(int i=0;;i++){ scanf("%d",&a[i]); if(a[i]==0){ j=i; while(){ if(j1!=0){ printf("%d",a[j1]); break; } j--; } } }
a.cc: In function 'int main()': a.cc:9:7: error: expected primary-expression before ')' token 9 | while(){ | ^ a.cc:10:4: error: 'j1' was not declared in this scope; did you mean 'j'? 10 | if(j1!=0){ | ^~ | j a.cc:17:2: error: expected '}' at end of input 17 | } | ^ a.cc:2...
s358376342
p00013
C++
#include<stdio.h> int main(){ int a[100]; int j; for(int i=0;;i++){ scanf("%d",&a[i]); if(a[i]==0){ j=i; while(){ if(j1!=0){ printf("%d",a[j1]); break; } j--; } } }
a.cc: In function 'int main()': a.cc:9:7: error: expected primary-expression before ')' token 9 | while(){ | ^ a.cc:10:4: error: 'j1' was not declared in this scope; did you mean 'j'? 10 | if(j1!=0){ | ^~ | j a.cc:17:2: error: expected '}' at end of input 17 | } | ^ a.cc:2...
s761555259
p00013
C++
#include<stdio.h> int main(){ int a[100]; int j; for(int i=0;;i++){ scanf("%d",&a[i]); if(a[i]==0){ j=i; while(){ if(j1!=0){ printf("%d",a[j1]); break; } j--; } a[j-1]=0; } }
a.cc: In function 'int main()': a.cc:9:7: error: expected primary-expression before ')' token 9 | while(){ | ^ a.cc:10:4: error: 'j1' was not declared in this scope; did you mean 'j'? 10 | if(j1!=0){ | ^~ | j a.cc:18:2: error: expected '}' at end of input 18 | } | ^ a.cc:2...
s545022007
p00013
C++
#include<stdio.h> int main(){ int a[100]; int j; for(int i=0;;i++){ scanf("%d",&a[i]); if(a[i]==0){ j=i; while(){ if(j1!=0){ printf("%d",a[j1]); break; } j--; } a[j-1]=0; if(j-1==0){ break; } } }
a.cc: In function 'int main()': a.cc:9:7: error: expected primary-expression before ')' token 9 | while(){ | ^ a.cc:10:4: error: 'j1' was not declared in this scope; did you mean 'j'? 10 | if(j1!=0){ | ^~ | j a.cc:21:2: error: expected '}' at end of input 21 | } | ^ a.cc:2...
s491247898
p00013
C++
#include<stdio.h> int main(){ int a[100]; int j; for(int i=0;;i++){ scanf("%d",&a[i]); if(a[i]==0){ j=i; while(){ if(j-1!=0){ printf("%d",a[j-1]); break; } j--; } a[j-1]=0; if(j-1==0){ break; } } }
a.cc: In function 'int main()': a.cc:9:7: error: expected primary-expression before ')' token 9 | while(){ | ^ a.cc:21:2: error: expected '}' at end of input 21 | } | ^ a.cc:2:11: note: to match this '{' 2 | int main(){ | ^
s037922271
p00013
C++
#include<stdio.h> int main(){ int a[100]; int j,a=0; for(int i=0;i<100;i++){ scanf("%d",&a[i]); if(a[i]==0){ j=i; while(a=0){ if(j-1!=0){ printf("%d",a[j-1]); a=1; } j--; } a=0; a[j]=0; if(j-1==0){ i=101; } } }
a.cc: In function 'int main()': a.cc:4:7: error: conflicting declaration 'int a' 4 | int j,a=0; | ^ a.cc:3:5: note: previous declaration as 'int a [100]' 3 | int a[100]; | ^ a.cc:9:8: error: incompatible types in assignment of 'int' to 'int [100]' 9 | while(a=0){ | ~^~ a.cc...
s494427614
p00013
C++
#include<stdio.h> int main(){ int a[100]; int j,a=0; for(int i=0;i<100;i++){ scanf("%d",&a[i]); if(a[i]==0){ j=i; while(a=0){ if(j-1!=0){ printf("%d",a[j-1]); a=1; } j--; } a=0; a[j]=0; if(j-1==0){ i=101; } } }
a.cc: In function 'int main()': a.cc:4:7: error: conflicting declaration 'int a' 4 | int j,a=0; | ^ a.cc:3:5: note: previous declaration as 'int a [100]' 3 | int a[100]; | ^ a.cc:9:8: error: incompatible types in assignment of 'int' to 'int [100]' 9 | while(a=0){ | ~^~ a.cc...
s140824217
p00013
C++
#include<stdio.h> int main(){ int a[500]; int j,a=0; for(int i=0;i<500;i++){ scanf("%d",&a[i]); if(a[i]==0){ j=i; while(a=0){ if(j-1!=0){ printf("%d\n",a[j-1]); a=1; } j--; } a=0; a[j]=0; if(j==0){ i=501; } } } return 0; }
a.cc: In function 'int main()': a.cc:4:7: error: conflicting declaration 'int a' 4 | int j,a=0; | ^ a.cc:3:5: note: previous declaration as 'int a [500]' 3 | int a[500]; | ^ a.cc:9:8: error: incompatible types in assignment of 'int' to 'int [500]' 9 | while(a=0){ | ~^~ a.cc...
s167979119
p00013
C++
#include<stdio.h> int main(){ int a[500]; int j,a=0; for(int i=0;i<500;i++){ scanf("%d",&a[i]); if(a[i]==0){ j=i; while(a=0){ if(j-1!=0){ printf("%d\n",a[j-1]); a=1; } j--; } a=0; a[j]=0; if(j==0){ i=501; } } } return 0; }
a.cc: In function 'int main()': a.cc:4:7: error: conflicting declaration 'int a' 4 | int j,a=0; | ^ a.cc:3:5: note: previous declaration as 'int a [500]' 3 | int a[500]; | ^ a.cc:9:8: error: incompatible types in assignment of 'int' to 'int [500]' 9 | while(a=0){ | ~^~ a.cc...
s181069543
p00013
C++
import java.util.Scanner; import java.util.Stack; public class Main { public static void main(String[] args) { Scanner scn = new Scanner(System.in); Stack<Integer> stack = new Stack<Integer>(); while (scn.hasNext()) { int n = scn.nextInt(); if (n == 0) { System.out.println(stack.pop()); } else { ...
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:3:1: error: 'import' does not name a type 3 | import java.util.Stack; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts...
s952719135
p00013
C++
#include <stdio.h> int train[10]; int sp = 0; int empty() { return sp <= 0; } int size() { return sp; } int top() { return train[sp-1]; } void pop() { sp--; } void push(int v) { train[sp] = v; sp++; } int main(){ int num; while(1){ scanf("%d", &num); if(num == 0){ printf("%d\n", top...
a.cc: In function 'int main()': a.cc:37:12: error: lvalue required as left operand of assignment 37 | if(size() = 0) break; | ~~~~^~
s223587522
p00013
C++
#include <stdio.h> int train[10]; int sp = 0; int empty() { return sp <= 0; } int size() { return sp; } int top() { return train[sp-1]; } void pop() { sp--; } void push(int v) { train[sp] = v; sp++; } int main(){ int out[10]; int num, i = 0; while(1){ scanf("%d", &num); if(num == 0){ ...
a.cc: In function 'int main()': a.cc:41:25: error: expected ';' before ')' token 41 | for(i = 0, i < 10, i++){ | ^ | ; a.cc:44:3: error: expected primary-expression before 'return' 44 | return 0; | ^~~~~~ a.cc:43:4: error: expected ';' before...
s590757828
p00013
C++
#include <stdio.h> int main(void) { int a[10]; int b[10]; int c; int i=0; int t=0; do{ scanf_s("%d",&c); if (c >= 1 && c <= 10){ a[t] = c; t++; } else if (c == 0){ t--; b[i] = a[t]; i++; } } while (t > 0); printf("\n"); for (c = 0; c < i; c++){ printf("%d\n",b[...
a.cc: In function 'int main()': a.cc:11:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 11 | scanf_s("%d",&c); | ^~~~~~~ | scanf
s229412932
p00013
C++
#include <iostream> using namespace std; int a[11], b, t; int main() { cin>>a[0]; t=1; c=0; while(cin>>b) { if(b>0) { a[t]=b; t++; }else { cout<<a[t-1]<<endl; t--; } } return 0; ...
a.cc: In function 'int main()': a.cc:9:7: error: 'c' was not declared in this scope 9 | c=0; | ^
s477972404
p00013
C++
#include<iostream> using namespace std;main(){int i=0,num,a[10];while(cin>>n){if(n)a[i++]=n;else cout<<a[--i]<<endl;}}
a.cc:2:21: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | using namespace std;main(){int i=0,num,a[10];while(cin>>n){if(n)a[i++]=n;else cout<<a[--i]<<endl;}} | ^~~~ a.cc: In function 'int main()': a.cc:2:57: error: 'n' was not declared in this scope 2 |...
s277330084
p00013
C++
import java.util.ArrayDeque; import java.util.Scanner; public class Main { public static void main (String[] args) { Scanner scan = new Scanner(System.in); ArrayDeque<Integer> stack = new ArrayDeque<Integer>(); int n; while (scan.hasNext()) { n = Integer.parseInt(scan.nextLine()); if (n == 0) { Syst...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.ArrayDeque; | ^~~~~~ 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 '-fmodul...
s154194368
p00013
C++
#include <iostream> #include <stack> int main(){ stack<int> rail; int buf; // repeat until "cin" fails. while (cin >> buf) { if (buf == 0) { // train goes out. cout << rail.top(); rail.pop(); } else{ // train comes in. rail.push(buf); ...
a.cc: In function 'int main()': a.cc:6:5: error: 'stack' was not declared in this scope; did you mean 'std::stack'? 6 | stack<int> rail; | ^~~~~ | std::stack In file included from /usr/include/c++/14/stack:63, from a.cc:3: /usr/include/c++/14/bits/stl_stack.h:99:11: note: 's...
s854033143
p00013
C++
#include <math.h> #include <algorithm> #include <iomanip> #include <string> #include <stack> using namespace std; int main(){ int i; stack<int> s; while (cin >> i) { if (i == 0) { cout << s.top() << endl; s.pop(); } else { s.push(i); } } return 0; }
a.cc: In function 'int main()': a.cc:11:16: error: 'cin' was not declared in this scope 11 | while (cin >> i) { | ^~~ a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 5 | #include <stack> +++ |+#include <iostream...
s765132355
p00013
C++
import java.io.*; public class Main{ public static void main(String args[]) throws IOException{ BufferedReader bf = new BufferedReader( new InputStreamReader(System.in)); int i = 0, j = 0,x; int order[] = new int[10]; int exit[] = new int[1000]; String str; while((str = bf.readLine()) != null...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:2: error: expected unqualified-id before 'public' 3 | public class Main{ | ^~~~~~
s413391833
p00013
C++
//#define scanf_s scanf #include <stdio.h> #include <string> #include <iostream> #include <math.h> using namespace std; #define MAX 100 int main(void) { int n, now = 0; int list[MAX] = { 0 }; do{ scanf_s("%d", &n); if (n != 0) { list[now] = n; ++now; } else { --now; printf("%d\n", list[now]); } } while (now !...
a.cc: In function 'int main()': a.cc:13:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 13 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s778375209
p00013
C++
#include<iostream> #include<stack> using namespace std; int main() { int x; stack<int> st; while (cin >> x) { if (x) { st.push(n); } else { cout << st.top() << endl; st.pop(); } } return 0; }
a.cc: In function 'int main()': a.cc:11:33: error: 'n' was not declared in this scope 11 | st.push(n); | ^
s970786662
p00013
C++
#include<iostream> #include<vector> using namespace std; int main(){ int a; vector<int> s; vector<int> t; while(cin>>a){ if(a!=0){ s.push_back(a); }else{ s.pop_back(a); t.push_back(s[s.size()-1]); s.pop_back(s[s.size()-1]); } } ...
a.cc: In function 'int main()': a.cc:12:23: error: no matching function for call to 'std::vector<int>::pop_back(int&)' 12 | s.pop_back(a); | ~~~~~~~~~~^~~ In file included from /usr/include/c++/14/vector:66, from a.cc:2: /usr/include/c++/14/bits/stl_vector.h:1324:7: not...
s259494233
p00013
C++
{ stack<int>a; int b; scanf("%d",&b); a.push(b); while(cin>>b){ if(b)a.push(b); else {printf("%d\n",a.top());a.pop();} } }
a.cc:1:1: error: expected unqualified-id before '{' token 1 | { | ^
s890773263
p00013
C++
#include<stdio.h> #include <stack> int main(){ stack<int> st; int n, a; while(cin >> n){ if(n!=0){ st.push( n ); }else{ a = st.top(); cout << a << endl; st.pop(); } } }
a.cc: In function 'int main()': a.cc:5:9: error: 'stack' was not declared in this scope; did you mean 'std::stack'? 5 | stack<int> st; | ^~~~~ | std::stack In file included from /usr/include/c++/14/stack:63, from a.cc:2: /usr/include/c++/14/bits/stl_stack.h:99:11...
s319737902
p00013
C++
#include<stdio.h> #include <iostream> #include <stack> int main(){ stack<int> st; int n, a; while(cin >> n){ if(n!=0){ st.push( n ); }else{ a = st.top(); cout << a << endl; st.pop(); } } }
a.cc: In function 'int main()': a.cc:6:9: error: 'stack' was not declared in this scope; did you mean 'std::stack'? 6 | stack<int> st; | ^~~~~ | std::stack In file included from /usr/include/c++/14/stack:63, from a.cc:3: /usr/include/c++/14/bits/stl_stack.h:99:11...
s242231278
p00013
C++
#include <iostream> #include <stack> using namespace std; int main() { int num; stack<int> st; while(!cin.eof()) { cin >> num; if(num==0) { cout << stack.top() << endl; st.pop(); } else { st.push(num); } } return 0; }
a.cc: In function 'int main()': a.cc:17:38: error: missing template arguments before '.' token 17 | cout << stack.top() << endl; | ^
s396912296
p00013
C++
#include <iostream> #include <stack> using namespace std; int main() { int num; stack<int> stack; while(cin >> num;) { if(num==0) { cout << stack.top() << endl; stack.pop(); } else { stack.push(num); } } return 0; }
a.cc: In function 'int main()': a.cc:10:25: error: expected ')' before ';' token 10 | while(cin >> num;) | ~ ^ | ) a.cc:10:26: error: expected primary-expression before ')' token 10 | while(cin >> num;) | ^
s506838186
p00013
C++
#include<iostream> #include<stack> using namespace std; int main(){ stack<int> s; int n; cin>>n; s.push(n); while(cin>>n{ if(n==0){ cout<<s.top()<<endl; s.pop(); } else{ s.push(n); } } }
a.cc: In function 'int main()': a.cc:9:17: error: expected ')' before '{' token 9 | while(cin>>n{ | ~ ^ | )
s363971981
p00013
C++
list = {} while True: try: num = int(input()) if num == 0: print(list.pop()) else: list.append(num) except: break
a.cc:1:1: error: 'list' does not name a type 1 | list = {} | ^~~~ a.cc:2:1: error: expected unqualified-id before 'while' 2 | while True: | ^~~~~
s011757177
p00013
C++
#include <iostream> #include <stack> int main(){ std::stack<int> st; //car's number int num = 0; //Until the end of input while(std::cin >> num){ //if num = 0, output and delete if(num == 0){ std::cout << st.pop() << std::endl; //if num != 0, input } else { st.push(num); } } ...
a.cc: In function 'int main()': a.cc:14:35: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'void') 14 | std::cout << st.pop() << std::endl; | ~~~~~~~~~ ^~ ~~~~~~~~ | | ...
s447131083
p00013
C++
#include <iostream> #include <stack> int main(){ std::stack<int> st; //car's number int num = 0; //Until the end of input while(std::cin >> num){ //if num = 0, output and delete if(num == 0){ std::cout << st.pop() << std::endl; //if num != 0, input } else { st.push(num); } } ...
a.cc: In function 'int main()': a.cc:14:35: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'void') 14 | std::cout << st.pop() << std::endl; | ~~~~~~~~~ ^~ ~~~~~~~~ | | ...
s140889077
p00013
C++
#include<iostream> #define MAX 256 int main(void){ int i=0,j=0; int a[MAX]; int ans[MAX]; while(cin>>x){ if(x==0){ ans[j]=a[i-1]; j++; i--; }else{ ans[i]=x; i++; } } for(int i=0;i<j;i++){ cout<<ans[i]<<endl } }
a.cc: In function 'int main()': a.cc:10:15: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 10 | while(cin>>x){ | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istr...
s415587038
p00013
C++
#include<stdio.h> const int SIZE=100; int data[SIZE]; int sp=0; int size(){ return sp; } int empty(){ return sp<=0; } int top(){ return data[sp-1]; } void pop(){ sp--; } void push(int v){ data[sp]=v; sp++; } int main(){ int n,k; while(1){ scanf("%d",&n); if(n==0){ printf("%d\n",top()); ...
a.cc: In function 'int main()': a.cc:31:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 31 | if(n==empty)break; | ~^~~~~~~
s417858315
p00013
C++
#include <stdio.h> const int SIZE = 100; int data[SIZE]; int sp= 0; int size(){ return sp; } int top(){ return data[sp-1]; } void pop(){ sp--; } void push(int v){ data[sp] = v; sp++; } int main(){ int v; while(scanf("%d", &v)) != EOF){ if(v != 0){ push(v); } if(v == 0){ pop(); } top(); } }
a.cc: In function 'int main()': a.cc:23:25: error: expected primary-expression before '!=' token 23 | while(scanf("%d", &v)) != EOF){ | ^~
s347848098
p00013
C++
#include<stdio.h> const int SIZE=100; int data[SIZE]; int sp=0; int size(){ return sp; } int empty(){ return sp<=0; } int isfull(){ return sp>=SIZE; } int top(){ return data[sp-1]; } void pop(){ sp--; } void push(int v){ data[sp]=v; sp++; } int main(){ int k,n; for(k=0;k<100;k++){ scanf("%d",&n); ...
a.cc: In function 'int main()': a.cc:28:16: error: expected ')' before '{' token 28 | if(!empty(){ | ~ ^ | ) a.cc:38:3: error: expected primary-expression before '}' token 38 | } | ^
s662858041
p00013
C++
#include <stdio.h> const int SIZE = 100; int data[SIZE]; int sp= 0; void pop(){ sp--; } void push(int v){ data[sp] = v; sp++; } int main(){ int v; while(scanf("%d", &v) != EOF){ if(v != 0){ push(v); } if(v == 0){ printf("%d\n", top()); pop(); } } return 0; }
a.cc: In function 'int main()': a.cc:22:19: error: 'top' was not declared in this scope; did you mean 'pop'? 22 | printf("%d\n", top()); | ^~~ | pop
s389204791
p00013
C++
#include <stdio.h> const int SIZE = 100; int data[SIZE]; int sp= 0; void pop(){ sp--; } void push(int v){ data[sp] = v; sp++; } int main(){ int v; while(scanf("%d", &v) != EOF){ if(v != 0){ push(v); } if(v == 0){ printf("%d\n", top()); pop(); } } return 0; }
a.cc: In function 'int main()': a.cc:22:19: error: 'top' was not declared in this scope; did you mean 'pop'? 22 | printf("%d\n", top()); | ^~~ | pop
s326941144
p00013
C++
#include<iostream> #include<stack> using namespace std; int main(){ stack<int> s; int x; cin >> x; s.push(x); while(!s.empty()){ cin >> x; if(x==0){ cout << st.top() << endl; st.pop(); } else{ s.push(x); } } }
a.cc: In function 'int main()': a.cc:12:21: error: 'st' was not declared in this scope; did you mean 's'? 12 | cout << st.top() << endl; | ^~ | s
s436169133
p00013
C++
#include <stdio.h> int main(void) { std::stack<int> st; int n; while(scanf("%d", &n) != EOF) { if(n) st.push(n); else { printf("%d\n", st.top()); st.pop(); } } return 0; }
a.cc: In function 'int main()': a.cc:4:8: error: 'stack' is not a member of 'std' 4 | std::stack<int> st; | ^~~~~ a.cc:2:1: note: 'std::stack' is defined in header '<stack>'; this is probably fixable by adding '#include <stack>' 1 | #include <stdio.h> +++ |+#include <stack> 2 | a.cc:4:14: ...
s568350098
p00013
C++
#include <iostream> int stack[100]; int point=0; void push(int p){ stack[point]=0; ++point; } void pop(){ std:cout << stack[point] << endl; --point; } int main(){ int num; for(int i=0;i<100;i++){ std:cin >> num; if(num==0) pop(); else push(num); } return 0; }
a.cc:1:2: error: extended character   is not valid in an identifier 1 | #include <iostream> | ^ a.cc:1:2: error: invalid preprocessing directive #include\U00003000 1 | #include <iostream> | ^~~~~~~~~ a.cc: In function 'void pop()': a.cc:12:13: error: 'cout' was not declared in this scope 12 | ...
s226809468
p00013
C++
#include <iostream> int stack[100]; int point=0; void push(int p){ stack[point]=0; ++point; } void pop(){ std::cout << stack[point] << std::endl; --point; } int main(){ int num; for(int i=0;i<100;i++){ std::cin >> num; if(num==0) pop(); else push(num); } return 0; }
a.cc:1:2: error: extended character   is not valid in an identifier 1 | #include <iostream> | ^ a.cc:1:2: error: invalid preprocessing directive #include\U00003000 1 | #include <iostream> | ^~~~~~~~~ a.cc: In function 'void pop()': a.cc:12:14: error: 'cout' is not a member of 'std' 12 | ...
s296016280
p00013
C++
#include <iostream> #include <array> std::array<u_int, 100> stack; int point=0; void push(int p){ stack[point]=p; ++point; } void pop(){ std::cout << stack[point] << std::endl; --point; } int main(){ int num; for(int i=0;i<100;i++){ std::cin >> num; if(num==0) pop(); else push(num); } return 0; }...
a.cc:1:2: error: extended character   is not valid in an identifier 1 | #include <iostream> | ^ a.cc:1:2: error: invalid preprocessing directive #include\U00003000 1 | #include <iostream> | ^~~~~~~~~ a.cc:4:12: error: 'u_int' was not declared in this scope; did you mean 'int'? 4 | std::array<u...
s006291065
p00013
C++
#include <iostream> #include <array> std::array<u_int, 100> stack; int point=0; void push(int p){ stack[point]=p; ++point; } void pop(){ std::cout << stack[point] << std::endl; --point; } int main(){ int num; for(int i=0;i<100;i++){ std::cin >> num; if(num==0) pop(); else push(num); } return 0; }...
a.cc:1:2: error: extended character   is not valid in an identifier 1 | #include <iostream> | ^ a.cc:1:2: error: invalid preprocessing directive #include\U00003000 1 | #include <iostream> | ^~~~~~~~~ a.cc:4:12: error: 'u_int' was not declared in this scope; did you mean 'int'? 4 | std::array<u...
s014464002
p00013
C++
#include<stack> #include<iostream> using namespace std; void main(){ stack<int> train; int n; while(cin >> n){ if(n != 0) train.push(n); else{ cout << train.top() << endl; train.pop(); } } }
a.cc:4:1: error: '::main' must return 'int' 4 | void main(){ | ^~~~
s759036665
p00013
C++
n,*a=&n;main(){for(;~scanf("%s",a);)*a%8?a++:puts(--a);}
a.cc:1:1: error: 'n' does not name a type 1 | n,*a=&n;main(){for(;~scanf("%s",a);)*a%8?a++:puts(--a);} | ^ a.cc:1:9: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | n,*a=&n;main(){for(;~scanf("%s",a);)*a%8?a++:puts(--a);} | ^~~~ a.cc: In function 'int main()':...
s880252845
p00013
C++
#include <iostream> #include <vector> int main(int argc,char* argv[]){ std::vector<int> vec(1000); while(!std::cin.eof()){ int temp; std::cin >> temp; if(temp == 0){ std::cout << vec.back() << std::endl; vec.pop_back(); continue; }else{ vec.push_back(temp); continue...
a.cc: In function 'int main(int, char**)': a.cc:20:12: error: expected '}' at end of input 20 | return 0; | ^ a.cc:4:32: note: to match this '{' 4 | int main(int argc,char* argv[]){ | ^
s897749343
p00013
C++
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #define REP(i,a,b) for(i=a;i<b;i++) #define rep(i,n) REP(i,0,n) #define PUSH intStackPush #define POP intStackPop #define TOP intStackTop #define FREE intStackFree typedef struct stack{ int data; struct stack* next; }stack; stack *top = NU...
a.cc: In function 'stack* makeNewStack(int)': a.cc:19:10: error: expected unqualified-id before 'new' 19 | stack *new = (stack*)malloc(sizeof(stack)); | ^~~ a.cc:20:6: error: expected type-specifier before '->' token 20 | new->data = data; | ^~ a.cc:21:6: error: expected type-specifi...
s462086408
p00013
C++
#include <iostream> #include <stdio.h> #include <stack> using namespace std; stack<int> s; int ac; int main(void) { s.clear(); while(~scanf("%d", &ac)) { if(ac == 0) { cout << s.top() << endl; s.pop(); } else { s.push(ac); } } return 0; }
a.cc: In function 'int main()': a.cc:11:7: error: 'class std::stack<int>' has no member named 'clear' 11 | s.clear(); | ^~~~~
s356002358
p00013
C++
#include<iostream> using namespace std; int main(){ int a[]={0,0,0,0,0,0,0,0,0,0}; int b; while(cin>>b){ if(b==0){ cout<<a[0]; for(int i=0;i<9;i++){ a[i]=a[i+1];}} else{ for(int i=0;i<8;i++){ a[9-i]=a[8-i]} a[0]=b;}}
a.cc: In function 'int main()': a.cc:13:14: error: expected ';' before '}' token 13 | a[9-i]=a[8-i]} | ^ | ; a.cc:14:10: error: expected '}' at end of input 14 | a[0]=b;}} | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s151238291
p00013
C++
#include<iostream> using namespace std; int main(){ int a[]={0,0,0,0,0,0,0,0,0,0}; int b; while(cin>>b){ if(b==0){ cout<<a[0]; for(int i=0;i<9;i++){ a[i]=a[i+1];}} else{ for(int i=0;i<8;i++){ a[9-i]=a[8-i];} a[0]=b;}}
a.cc: In function 'int main()': a.cc:14:10: error: expected '}' at end of input 14 | a[0]=b;}} | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s061602291
p00013
C++
#include<iostream> using namespace std; int main(){ int a[]={0,0,0,0,0,0,0,0,0,0}; int b; while(cin>>b){ if(b==0){ cout<<a[0]; for(int i=0;i<9;i++){ a[i]=a[i+1];}} else{ for(int i=0;i<9;i++){ a[9-i]=a[8-i];} a[0]=b;}}
a.cc: In function 'int main()': a.cc:14:10: error: expected '}' at end of input 14 | a[0]=b;}} | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s154020388
p00013
C++
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <stack> #include <queue> #include <cstring> #include <climits> #include <cmath> #include <cfloat> #define FOR(i,b,n) for(int i=b;i<n;i++) #define CLR(mat) memset(mat, 0, sizeof(mat)) #define INF 1<<25 #define LIM 1000000 using names...
a.cc: In function 'int main()': a.cc:34:30: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>') 34 | cout << st.top << endl; | ~~~~ ^~ ~~~~~~ | ...
s386794223
p00013
C++
#include <iostream> #include <stack> #include <vector> using namespace std; int main() { stack<int> car; vector<int> outlist; while( !car.empty() || outlist.empty() ) { int carnum; cin >> carnum; if(carnum) { car.push(carnum); } else { outlist.push_back(car.top()); car.pop(); } } cout...
a.cc: In function 'int main()': a.cc:26:25: error: 'i' was not declared in this scope 26 | cout << outlist[i] << '\n'; | ^
s137663604
p00013
C++
#include<cstdio> #include<queue> using namespace std; int main(){ int x; queue<int> q; while(scanf("%d", &x) != EOF){ if(x == 0){ printf("%d\n", q.top()); q.pop(); } else{ q.push(x); } } return 0; }
a.cc: In function 'int main()': a.cc:10:24: error: 'class std::queue<int>' has no member named 'top'; did you mean 'pop'? 10 | printf("%d\n", q.top()); | ^~~ | pop
s592241482
p00013
C++
#include<iostream> #include<vector> using namespace std; int main() { int a; vector<int> array; for(;cin >> a;) { if(a==0) { cout << array[array.size()-1] << endl; array.pop(); } else array.push_back(a); } }
a.cc: In function 'int main()': a.cc:15:7: error: 'class std::vector<int>' has no member named 'pop' 15 | array.pop(); | ^~~
s930332917
p00013
C++
const int N=10; using namespace std; int main(){ int a[N]; int n=0; while (!cin.eof()){ int t; cin>>t; if (t) a[n++]=t; else cout<<a[--n]<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:13: error: 'cin' was not declared in this scope 8 | while (!cin.eof()){ | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | const int N=10; a.cc:1...
s291140938
p00013
C++
#include <iostream> #include <stack> #include <cstdio> using namespace std; int main(){ stack<int> st; int a; while(cin>>a){ if(a)st.push(a); else {printf("%d\n",st.top()); st.pop(); } } } return 0; }
a.cc:17:3: error: expected unqualified-id before 'return' 17 | return 0; | ^~~~~~ a.cc:18:1: error: expected declaration before '}' token 18 | } | ^
s664352161
p00013
C++
#include<iostream> int main(){int a,c=0,s[12];while(std::cin>>a){if(a!=0)s[c++]=a;else std::cout<<s[--c]<<"\n"}return 0;}
a.cc: In function 'int main()': a.cc:2:92: error: expected ';' before '}' token 2 | int main(){int a,c=0,s[12];while(std::cin>>a){if(a!=0)s[c++]=a;else std::cout<<s[--c]<<"\n"}return 0;} | ^ | ...
s393475223
p00013
C++
#include<iostream>int main(){int a,c=0,s[12];while(std::cin>>a){if(a!=0)s[c++]=a;else std::cout<<s[--c]<<"\n";}return 0;}
a.cc:1:23: warning: extra tokens at end of #include directive 1 | #include<iostream>int main(){int a,c=0,s[12];while(std::cin>>a){if(a!=0)s[c++]=a;else std::cout<<s[--c]<<"\n";}return 0;} | ^~~~ a.cc:1:9: fatal error: iostream>in: No such file or directory 1 | #include<iostream>int m...
s821313883
p00014
Java
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); while(sc.hasNextInt()){ int d=sc.nextInt(); int n=600/d-1; int s=n*(n+1)*(2n+1)*Math.pow(d,3)/6; System.out.println(s); } } }
Main.java:9: error: ')' expected int s=n*(n+1)*(2n+1)*Math.pow(d,3)/6; ^ Main.java:9: error: not a statement int s=n*(n+1)*(2n+1)*Math.pow(d,3)/6; ^ Main.java:9: error: ';' expected int s=n*(n+1)*(2n+1)*Math.pow(d,3)/6; ^ Main.java:9: error: not a statement int s=n*(n...
s978585897
p00014
Java
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); while(sc.hasNextInt()){ int d=sc.nextInt(); int n=600/d-1; int s=n*(n+1)*(2n+1)*d*d*d/6; System.out.println(s); } } }
Main.java:9: error: ')' expected int s=n*(n+1)*(2n+1)*d*d*d/6; ^ Main.java:9: error: not a statement int s=n*(n+1)*(2n+1)*d*d*d/6; ^ Main.java:9: error: ';' expected int s=n*(n+1)*(2n+1)*d*d*d/6; ^ Main.java:9: error: not a statement int s=n*(n+1)*(2n+1)*d*d*d/6; ...
s671972466
p00014
Java
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); while(sc.hasNextInt()){ int d=sc.nextInt(); int n=600/d-1; long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6; System.out.println(s); } } }
Main.java:9: error: ')' expected long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6; ^ Main.java:9: error: not a statement long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6; ^ Main.java:9: error: ';' expected long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6; ^ Main.java:9: error: not a statement long...
s225322211
p00014
Java
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); while(sc.hasNextInt()){ int d=sc.nextInt(); int n=(600/d)-1; long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6; System.out.println(s); } } }
Main.java:9: error: ')' expected long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6; ^ Main.java:9: error: not a statement long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6; ^ Main.java:9: error: ';' expected long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6; ^ Main.java:9: error: not a statement long...
s338454160
p00014
Java
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); while(sc.hasNextInt()){ long d=sc.nextLong(); long n=(600/d)-1; long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6; System.out.println(s); } } }
Main.java:9: error: ')' expected long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6; ^ Main.java:9: error: not a statement long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6; ^ Main.java:9: error: ';' expected long s=n*(n+1)*(2n+1)*Math.pow(d,3)/6; ^ Main.java:9: error: not a statement long...
s867871947
p00014
Java
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); while(sc.hasNextInt()){ long d=sc.nextLong(); long n=(600/d)-1; long s=((2*Math.pow(n,3)+3*Math.pow(n,2)+n)*Math.pow(d,3))/6; System.out.println(s); } } }
Main.java:9: error: incompatible types: possible lossy conversion from double to long long s=((2*Math.pow(n,3)+3*Math.pow(n,2)+n)*Math.pow(d,3))/6; ^ 1 error
s456150839
p00014
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Integral { /** * ??????????????¨????????¢???????????¨????????? y = x^2 x = 600 * ?????????????¨???????????????? * @param args * @throws IOException * @throws NumberFormatException */ public static v...
Main.java:5: error: class Integral is public, should be declared in a file named Integral.java public class Integral { ^ 1 error
s264741015
p00014
Java
public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str; while((str=br.readLine()) != null){ int integral = 0; int j=1; int d = Integer.parseInt(str); int num = 600 / d; for(int i=0; i<num-1; i++){ i...
Main.java:2: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) throws IOException ^ (use --enable-preview to enable unnamed classes) 1 error
s885158324
p00014
Java
public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str; while((str=br.readLine()) != null){ int integral = 0; int j=1; int d = Integer.parseInt(str); int num = 600 / d; for(int i=0; i<num-1; i++){ i...
Main.java:2: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) throws IOException ^ (use --enable-preview to enable unnamed classes) 1 error
s766537042
p00014
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>(); while(scan.hasNext()){ int d = scan.nextInt(); int n600 = 600; int ans = 0; for(int x = d; x < n600; x += d){ ...
Main.java:13: error: ')' expected ans += d * ((x * x); ^ 1 error
s323204262
p00014
Java
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner s = new Scanner(System.in); int d; while(true){ d=s.nextInt(); if(d != null) integral(d[i]); else ...
Main.java:9: error: bad operand types for binary operator '!=' if(d != null) integral(d[i]); ^ first type: int second type: <null> Main.java:9: error: cannot find symbol if(d != null) integral(d[i]); ...
s348973879
p00014
Java
import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Scanner; class Main { public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); while (sc.hasNextInt()) { ...
Main.java:10: error: cannot find symbol while (sc.hasNextInt()) { ^ symbol: variable sc location: class Main 1 error
s488068337
p00014
Java
import java.io.BufferedReader; import java.io.InputStreamReader; //public class Problem0014_Integral { public class Main { public static void main(String[] args) { try { // Problem0014_Integral test = new Problem0014_Integral(); Main test = new Main(); BufferedReader reader = new BufferedReader(new ...
Main.java:14: error: cannot find symbol CarStack stack = new CarStack(); ^ symbol: class CarStack location: class Main Main.java:14: error: cannot find symbol CarStack stack = new CarStack(); ^ symbol: class CarStack location: class Main 2 errors
s348427146
p00014
Java
import java.util.Scanner; public class Integral { public static void main(String[] args) { Scanner in = new Scanner(System.in); while(in.hasNext())calc(in); } private static void calc(Scanner in){ int sum=0,d = in.nextInt(); for(int i=1;d*i<=600-d;i++) sum+=Math.pow(d*i, 2)*d; System.out.println(sum); ...
Main.java:3: error: class Integral is public, should be declared in a file named Integral.java public class Integral { ^ 1 error
s511531236
p00014
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int d, x; while (sc.hasNext()) { area = 0; d = sc.nextInt(); for (int i = 0; i < 600; i += d) { x = i * i; area += x * d; } System.out.println(area); } } }
Main.java:8: error: cannot find symbol area = 0; ^ symbol: variable area location: class Main Main.java:12: error: cannot find symbol area += x * d; ^ symbol: variable area location: class Main Main.java:14: error: cannot find symbol System.out.println(area); ^ symbo...
s480505193
p00014
C
#include <stdio.h> int main(void){ int d,h,i; scanf("%d",&d); for(i=0;i<600/d;i++){ h += d*i*d*i } printf("%d\n", h*d); return 0; }
main.c: In function 'main': main.c:9:17: error: expected ';' before '}' token 9 | h += d*i*d*i | ^ | ; 10 | } | ~
s641188804
p00014
C
#include <stdio.h> int main(void){ int d,h,i; while(EOF!=scanf("%d",&d)){ for(i=0;i<600/d;i++){ h += d*i*d*i } printf("%d\n", h*d); } return 0; }
main.c: In function 'main': main.c:9:17: error: expected ';' before '}' token 9 | h += d*i*d*i | ^ | ; 10 | } | ~
s313768831
p00014
C
#include<stdio.h> int function(int x){ return x * x; } int main(void){ int d; int i; while(scanf("%d",&d) != EOF){ s = 0; for(i=0;i<600;i+=d){ s += d*function(i); } printf("%d\n",s); } return 0; }
main.c: In function 'main': main.c:14:5: error: 's' undeclared (first use in this function) 14 | s = 0; | ^ main.c:14:5: note: each undeclared identifier is reported only once for each function it appears in
s581066867
p00014
C
#include "stdio.h" #include "math.h" int main() { int d, x; while(scanf("%d", &d) != EOF){ x = 0; for(int i = 0; i < 600; i += d){ x += (d * pow(i, 2.0)); } printf("%d\n", x); } return 0; }
/usr/bin/ld: /tmp/cctOJF4c.o: in function `main': main.c:(.text+0x4d): undefined reference to `pow' collect2: error: ld returned 1 exit status
s258175586
p00014
C
#include<stdio.h> int main() { int d, i, sum, length; while (scanf_s("%d", &d) != EOF) { length = 600; sum = 0; for (i = 1; i<length / d; i++) { sum += i*i*d*d; } printf("%d", sum*d); } }
main.c: In function 'main': main.c:6:16: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 6 | while (scanf_s("%d", &d) != EOF) { | ^~~~~~~ | scanf
s163949478
p00014
C
#include <stdio.h> main() { long int x,ret; while(EOF != scanf("%ld",&n)) { ret = x* x * x * (600/x-1)*(600/x)*(600/x*2-1)/6; printf("%ld\n",ret); } return 0; }
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main() | ^~~~ main.c: In function 'main': main.c:5:31: error: 'n' undeclared (first use in this function) 5 | while(EOF != scanf("%ld",&n)) | ^ main.c:5:31: note: each undeclared identifier is rep...
s131103058
p00014
C
#include<stdio.h> int main(){ int d,i,s_sum; cnt =0; s_sum=0; while(scanf("%d",&d)!=EOF){ for(i=1;(d*i)<=(600-d);i++) { s_sum=s_sum+d*(d*i)*(d*i); } printf("%d\n", s_sum); } return 0; }
main.c: In function 'main': main.c:6:3: error: 'cnt' undeclared (first use in this function); did you mean 'int'? 6 | cnt =0; | ^~~ | int main.c:6:3: note: each undeclared identifier is reported only once for each function it appears in
s519648466
p00014
C
#include<stdio.h> int main(void) { int i,j,area=0; for(i=0;i<20;i++) { scanf("%d\n",&d); for(j=1;j<=600-d;j++) area+=d^3*j^2; printf("%d\n",area); } return 0; }
main.c: In function 'main': main.c:8:15: error: 'd' undeclared (first use in this function) 8 | scanf("%d\n",&d); | ^ main.c:8:15: note: each undeclared identifier is reported only once for each function it appears in
s214807500
p00014
C
#include<stdio.h> int main() { int d, s, i, sum; while(scanf("%d", &d)!=EOF){ sum = 0; for(i*d=0; i*d<=600-d; i++){ s = d*(i*d)*(i*d); sum = sum + s; } printf("%d\n", sum); } return 0; }
main.c: In function 'main': main.c:11:14: error: lvalue required as left operand of assignment 11 | for(i*d=0; i*d<=600-d; i++){ | ^
s696995682
p00014
C
#include <stdio.h> int area(int x,int d); int main(void) { int x, s, d, i, j; for (;;) { scanf_s("%d", &d); x = 600 / d; s = 0; for (j = 1; j < x; j++) { s += area(j,d); } printf("%d\n", s); } return 0; } int area(int x,int d) { return d*(x*d)*(x*d); }
main.c: In function 'main': main.c:7:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 7 | scanf_s("%d", &d); | ^~~~~~~ | scanf
s642351869
p00014
C
#inclde<stdio.h> int main(void) { int d,i,d2; scanf("%d",&d); d2=d*d; for(i=0;i<=d;i++){ s=d*(i*i); s+=s; } printf("%d",s)
main.c:1:2: error: invalid preprocessing directive #inclde; did you mean #include? 1 | #inclde<stdio.h> | ^~~~~~ | include main.c: In function 'main': main.c:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 6 | scanf("%d",&d); | ^~~~~ main.c:1:1: not...
s687440948
p00014
C
#inclde<stdio.h> int main(void) { int d,i,d2; scanf("%d",&d); d2=d*d; for(i=0;i<=d;i++){ s=d*(i*i); s+=s; } printf("%d",s); return 0; }
main.c:1:2: error: invalid preprocessing directive #inclde; did you mean #include? 1 | #inclde<stdio.h> | ^~~~~~ | include main.c: In function 'main': main.c:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 6 | scanf("%d",&d); | ^~~~~ main.c:1:1: not...
s423808023
p00014
C
#inclde<stdio.h> int main(void) { int d,i; scanf("%d",&d); for(i=0;i<=d;i++) { s=d*(i*i); s+=s; } printf("%d",s); return 0; }
main.c:1:2: error: invalid preprocessing directive #inclde; did you mean #include? 1 | #inclde<stdio.h> | ^~~~~~ | include main.c: In function 'main': main.c:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 6 | scanf("%d",&d); | ^~~~~ main.c:1:1: not...
s862194436
p00014
C
#inclde<stdio.h> int main(void) { int d,i,s,a; scanf("%d",&d); for(i=0;i<=d;i++) { s=d*(i*i); a+=s; } printf("%d",a); return 0; }
main.c:1:2: error: invalid preprocessing directive #inclde; did you mean #include? 1 | #inclde<stdio.h> | ^~~~~~ | include main.c: In function 'main': main.c:6:2: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 6 | scanf("%d",&d); | ^~~~~ main.c:1:1: note:...