submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s132946788
p03844
C++
#include<bits/stdc++.h> using namespace std; int main(){ long long a,b; char op; scanf("%lld%c%lld",&a &op &b); if(op=='+'){ printf("%lld",a+b); } else if(op=='-'){ printf("%lld",a-b); } }
a.cc: In function 'int main()': a.cc:6:23: error: invalid operands of types 'long long int*' and 'char' to binary 'operator&' 6 | scanf("%lld%c%lld",&a &op &b); | ~~ ^~~ | | | | | char | long long int*
s971321332
p03844
C++
#include<bits/stdc++.h> using namespace std; int main(){ long long a,b; char op; scanf("%lld%c%lld",&a &op &b); if(op=='+'){ printf("%lld",a+b); } else if(op=='-'){ printf("%lld",a-b); } }
a.cc: In function 'int main()': a.cc:6:23: error: invalid operands of types 'long long int*' and 'char' to binary 'operator&' 6 | scanf("%lld%c%lld",&a &op &b); | ~~ ^~~ | | | | | char | long long int*
s745229978
p03844
C
#include <bits/stdc++.h> using namespace std; int main(){ int a,b; char op; scanf("%d%d%c",&a,&b,&op); if(op=='+') printf("%d",(a+b)); else if(op=='-') printf("%d",(a-b)); return 0; }
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s784575248
p03844
C++
#include<bits\stdc++.h> using namespace std; int main(){ int a; int b; char x; cin>>a>>x>>b; // scanf("%d%c%d",&a,&x,&b); switch(x){ case '-': cout<<a-b; break; case '+': cout<<a+b; break; } return 0; }
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s497061430
p03844
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,x; char s; cin>>a>>s>>b; if(s==43)  { x=a+b; cout<<x;} else  {x=a-b; cout<<x; } }
a.cc:9:1: error: extended character   is not valid in an identifier 9 |  { | ^ a.cc:13:1: error: extended character   is not valid in an identifier 13 |  {x=a-b; | ^ a.cc: In function 'int main()': a.cc:9:1: error: '\U000000a0' was not declared in this scope 9 |  { | ^ a.cc:13:1: error: '\U...
s816448669
p03844
C++
#include<bits\stdc++.h> using namespace std; int main(){ int a; int b; char x; cin>>a>>x>>b; if(x=='-') cout<<a-b; else if(x=='+') cout<<a+b; return 0; }
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s878184405
p03844
C
#include <bits/stdc++.h> using namespace std; int main(){ int a,b; char op; scanf("%d%c%d",&a,&op,&b); if(op=='+') printf("%d",(a+b)); else if(op=='-') printf("%d",(a-b)); return 0;
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s810777346
p03844
C++
#include<bits\stdc++.h> using namespace std; int main(){ int a; int b; char x; cin>>a>>x>>b; switch(x){ case '-': cout<<a-b; break; case '+': cout<<a+b; break; } return 0; }
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s756166636
p03844
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b; char op; scanf("%d%c%d",&a,&op,&b); if(op=='+') printf("%d",(a+b)); else if(op=='-') printf("%d",(a-b)); return 0;
a.cc: In function 'int main()': a.cc:11:10: error: expected '}' at end of input 11 | return 0; | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s155482743
p03844
C++
#include<iostream> using namespace std; int main( ){ int a,b; char op; cin>>a>>op>>b; if(op=='+'){ cout<<a+b; } if(op=='-'){ cout<<a-b; } return 0; }‏
a.cc:12:12: error: extended character ‏ is not valid in an identifier 12 | return 0; }‏ | ^ a.cc:12:12: error: '\U0000200f' does not name a type 12 | return 0; }‏ |
s444097291
p03844
C++
#include<iostream> using namespace std; int main(){ int a; char op; int b; cin>>a>>op>>b; if(op=='+'){ cout<<a+b; } if(op=='-'){ cout<<a-b; } return 0; }‏
a.cc:13:12: error: extended character ‏ is not valid in an identifier 13 | return 0; }‏ | ^ a.cc:13:12: error: '\U0000200f' does not name a type 13 | return 0; }‏ |
s673057362
p03844
C++
#include<iostream> using namespace std; int main(){ int a,b; char op; cin>>a>>op>>b; if(op=='+'){ cout<<a+b; } if(op=='-'){ cout<<a-b; } }‏
a.cc:12:2: error: extended character ‏ is not valid in an identifier 12 | }‏ | ^ a.cc:12:2: error: '\U0000200f' does not name a type 12 | }‏ |
s015347452
p03844
C++
#include<bits\stdc++.h> using namespace std; int main(){ int a; int b; char op; cin>>a>>op>>b; if(op=='-') cout<<a-b; else if(op=='+') cout<<a+b; return 0; }
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s786014562
p03844
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,x; char s; cin>>a>>s>>b; if(s==43)  { x=a+b; cout<<x;} else  {x=a-b; cout<<x; } }
a.cc:9:1: error: extended character   is not valid in an identifier 9 |  { | ^ a.cc:13:1: error: extended character   is not valid in an identifier 13 |  {x=a-b; | ^ a.cc: In function 'int main()': a.cc:9:1: error: '\U000000a0' was not declared in this scope 9 |  { | ^ a.cc:13:1: error: '\U...
s094374807
p03844
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,x; char s; cin>>a>>s>>b; if(s=='+')  { x=a+b; cout<<x;} else  {x=a-b; cout<<x; } }
a.cc:9:1: error: extended character   is not valid in an identifier 9 |  { | ^ a.cc:13:1: error: extended character   is not valid in an identifier 13 |  {x=a-b; | ^ a.cc: In function 'int main()': a.cc:9:1: error: '\U000000a0' was not declared in this scope 9 |  { | ^ a.cc:13:1: error: '\U...
s906509947
p03844
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,r; string op; scanf("%d%s%d",&a ,&op, &b); r=aopb; printf("%d");}
a.cc: In function 'int main()': a.cc:7:3: error: 'aopb' was not declared in this scope; did you mean 'op'? 7 | r=aopb; | ^~~~ | op
s586393015
p03844
C++
#include<iostream> using namespace std; int main(){ int a,b; char op; cin>>a>>op>>b; if(op=='+'){ cout<<a+b; } if(op=='-'){ cout<<a-b; } return 0; }‏
a.cc:12:12: error: extended character ‏ is not valid in an identifier 12 | return 0; }‏ | ^ a.cc:12:12: error: '\U0000200f' does not name a type 12 | return 0; }‏ |
s206568522
p03844
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; char op; cin>>a>>op>>b; if(op=='+'){ cout<<a+b; } if(op=='-'){ cout<<a-b; } return 0; }‏
a.cc:11:12: error: extended character ‏ is not valid in an identifier 11 | return 0; }‏ | ^ a.cc:11:12: error: '\U0000200f' does not name a type 11 | return 0; }‏ |
s154103835
p03844
C
#include <iostream> using namespace std; int main() { long long a,b,x ,i=0; cin >> a>>b>>x; i=(b/x)-(a-1)/x; if (a<=b&&a==0) cout << i<<endl; return 0; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s242743573
p03844
C++
#include <bits/stdc++.h> using namespace std; int main(){ int A,B; string op; cin>>A>>op>>p; if(op=="+") { cout<<A+B; } else{ cout<<A-B; } return 0; }
a.cc: In function 'int main()': a.cc:6:13: error: 'p' was not declared in this scope; did you mean 'op'? 6 | cin>>A>>op>>p; | ^ | op
s870232765
p03844
C++
#include <bits/stdc++.h> using namespace std ; int main() { int a,b; char c; cin>>a>>b>>c; switch(c){ case'+': cout<<a+b; break; default; cout<<a-b; break;} return 0; }
a.cc: In function 'int main()': a.cc:12:8: error: expected ':' before ';' token 12 | default; | ^ | :
s499303453
p03844
C++
#include<bits\stdc++.h> using namespace std; int main(){ int a; int b; char x; cin>>a>>x>>b; // scanf("%d%c%d",&a,&x,&b); switch(x){ case '-': cout<<a-b; break; case '+': cout<<a+b; break; } return 0; }
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s639597331
p03844
C++
#include<bits\stdc++.h> using namespace std; int main(){ int a; int b; char x; cin>>a>>x>>b; // scanf("%d%c%d",&a,&x,&b); switch(x){ case '-': cout<<a-b; break; case '+': cout<<a+b; break; } return 0; }
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s187252703
p03844
C++
#include<iostream> using namespace std; int main(){ int a,b; char op; cin>>a>>op>>b; if(op=='+'){ cout<<a+b; } if(op=='-'){ cout<<a-b; } return 0;
a.cc: In function 'int main()': a.cc:12:10: error: expected '}' at end of input 12 | return 0; | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s803125764
p03844
C++
#Include<bits/stdc++.h> using namespace std; int main(){ int a,b; char op; cin>>a>>op>>b; if(op=='+'){ cout<<a+b; } if(op=='-'){ cout<<a-b; } return 0; }‏
a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include? 1 | #Include<bits/stdc++.h> using namespace std; int main(){ int a,b; char op; cin>>a>>op>>b; if(op=='+'){ cout<<a+b; } if(op=='-'){ cout<<a-b; } return 0; }‏ ...
s929062346
p03844
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; char op; cin>>a>>op>>b; if(op=='+'){ cout<<a+b; } if(op=='-'){ cout<<a-b; } return 0; }‏
a.cc:13:2: error: extended character ‏ is not valid in an identifier 13 | }‏ | ^ a.cc:13:2: error: '\U0000200f' does not name a type 13 | }‏ |
s386971642
p03844
C++
include<bits/stdc++.h> using namespace std; int main(){ int a,b; char op; cin>>a>>op>>b; if(op=='+'){ cout<<a+b; } if(op=='-'){ cout<<a-b; } return 0; }‏
a.cc:11:12: error: extended character ‏ is not valid in an identifier 11 | return 0; }‏ | ^ a.cc:1:1: error: 'include' does not name a type 1 | include<bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:5:16: error: 'cin' was not declared in this scope 5 | char op; cin...
s387363925
p03844
C
#include<stdio.h> #include<stdlib.h> int main(){ int s,b; char op; scanf("%d%c%d",a,op,b); if(op=='+'){ printf("%d\n",a+b); }else if(op=='-'){ printf("%d\n",a-b); } return 0; }
main.c: In function 'main': main.c:6:18: error: 'a' undeclared (first use in this function) 6 | scanf("%d%c%d",a,op,b); | ^ main.c:6:18: note: each undeclared identifier is reported only once for each function it appears in
s144320512
p03844
C
#include <iostream> #include <stdio.h> using namespace std; int main() { int x ,y; char c; cin >> x; cin >> c; cin >> y; switch (c) { case '+': cout << x + y; break; case '-': cout << x - y; break; } }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s940609985
p03844
C++
#include <bits/stdc++.h> #include <stdio.h> using namespace std; int main(){ long long a,b,r; char c; scanf("%lld%lld%c",&a,&c,&b); if (c=='+') cout <<a+b; else if c=='-') cout <<a-b; return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: expected '(' before 'c' 10 | else if c=='-') | ^ | (
s561844709
p03844
C++
#include<bits/stdc++.h> using namespace std ; int main (){ int A,B; char op; scanf("%d ",&A); scanf("%c ",&op); scanf("%d",&B); if(op=='+') printf("%d",A+B); else printf("%d",A-B);
a.cc: In function 'int main()': a.cc:12:18: error: expected '}' at end of input 12 | printf("%d",A-B); | ^ a.cc:3:12: note: to match this '{' 3 | int main (){ | ^
s339262505
p03844
C
#include <bits/stdc++.h> using namespace std; int main() { int a,b,sum=0; char x; cin>>a>>x>>b; if(x=='+'){ sum=a+b; } else if(x=='-'){ sum=a-b; }else{ printf("wrong op"); } printf("%d",sum); return 0; }
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s358275883
p03844
C++
#include<iostream> using namespace std; int main(){ int A,B; char x; cin>>A; cin>>s; cin>>B; if(x=='+'){ cout<<A+B<<endl; } else{ cout<<A-B<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:14: error: 's' was not declared in this scope 7 | cin>>s; | ^
s508713530
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A; string B; int C; cin>>A>>B>>C; if(B=="+"){ cout<<A+B<<endl; } else{ cout<<A-B<<endl; } }
a.cc: In function 'int main()': a.cc:9:8: error: no match for 'operator+' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 9 | cout<<A+B<<endl; | ~^~ | | | | | std::string {aka std::__cxx11::basic_string<char>} | int In file include...
s818472308
p03844
C++
#include <iostream> using namespace std; int main() { int A, op, B; cin >> A >> op >> B ; if(op == "+"){ cout << (A + B) << endl; } else { cout << (A - B) << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(op == "+"){ | ~~~^~~~~~
s866610755
p03844
C++
#include <iostream> using namespace std; int main() { int A, op, B; cin >> A >> op >> B ; if (op == "+"){ cout << (A + B) << endl; } else { cout << (A - B) << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if (op == "+"){ | ~~~^~~~~~
s071584028
p03844
C++
#include <iostream> using namespace std; int main() { int A, op, B; cin >> A >> op >> B ; cout << (A op B) << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:15: error: expected ')' before 'op' 8 | cout << (A op B) << endl; | ~ ^~~ | )
s667140782
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A ,O,B; cin>>A>>O>>B; cout <<AOB; }
a.cc: In function 'int main()': a.cc:7:10: error: 'AOB' was not declared in this scope 7 | cout <<AOB; | ^~~
s620049311
p03844
C
#include <iostream> using namespace std; int main() { int a,b; char op; cin>>a >>op >> b; if(op=='+') { cout<< a+b; } else { cout << a-b; } return 0; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s055199284
p03844
Java
// 2019/07/08 // AtCoder Beginner Contest 050 - A import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); // Input int a = sc.nextInt(); int o = sc.next(); int b = sc.nextInt(); int ans; // Check ...
Main.java:10: error: incompatible types: String cannot be converted to int int o = sc.next(); ^ Main.java:15: error: int cannot be dereferenced if(o.equals("+")){ ^ 2 errors
s670291875
p03844
C++
#include<bits/stdc++.h> using namespace std; int main(){ int A ,B; char C; cin>>A>>C>>B; if(C=='+') int D = A+B; else int D = A-B; cout<<D<<endl; }
a.cc: In function 'int main()': a.cc:8:9: error: 'D' was not declared in this scope 8 | cout<<D<<endl; | ^
s074530868
p03844
C++
#include<iostream> #include<vector> #include<string> #include<cstring> #include<algorithm> #include<map> #include<set> #include<cmath> #include<cassert> #include<queue> using namespace std; typedef long long ll; typedef unsigned long long ull; int main() { ll A, B; char op; cin >> A >> op >> B; if (op == "+")...
a.cc: In function 'int main()': a.cc:20:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 20 | if (op == "+") cout << A+B << endl; | ~~~^~~~~~
s341501691
p03844
C++
#include<iostream> using namespace std; int main(){ int a,b; char x; cin >> a >> x >> b; if(x==+) cout << a+b; else cout << a-b; }
a.cc: In function 'int main()': a.cc:8:10: error: expected primary-expression before ')' token 8 | if(x==+) | ^
s510783307
p03844
C++
#include <bits/stdc++.h> int main() { int A,B; string op; cin >> A >> op >> B; if (op =="+"){ cout << A+B << endl; } else{ cout << A-B << endl; } }
a.cc: In function 'int main()': a.cc:5:3: error: 'string' was not declared in this scope 5 | string op; | ^~~~~~ a.cc:5:3: note: suggested alternatives: In file included from /usr/include/c++/14/string:41, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux...
s812942034
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A,B,X; char OP; cin >> A >> OP >> B; if(OP=="+"){ X = A + B; } if(OP=="-"){ X = A- B; } cout << X <<endl; }
a.cc: In function 'int main()': a.cc:9:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(OP=="+"){ | ~~^~~~~ a.cc:12:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 12 | if(OP=="-"){ | ~~^~~~~
s360611868
p03844
C++
#include <bits/stdc++.h> int main() { int a,b; char op; cin>>a>>op>>b; if(op=='-') a-=b; else a+=b; cout<<a<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin>>a>>op>>b; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iost...
s995927501
p03844
C++
#include <iostream> int main(){ int a, b; char op; cin >> a >> op >> b; if( op=='+' ) cout << a+b << endl; if( op=='-' ) cout<< a-b << endl; }
a.cc: In function 'int main()': a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin >> a >> op >> b; | ^~~ | 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; ///< Li...
s912423438
p03844
C++
#include <iostream> using namespace std; int main(void) { (double)int A, B; string op; if (A < B) { if (op == "+") { cout << A+B << endl; } else { cout << "-" << B-A << endl; } else { if (op == "+") { cout << A+B << endl; } else { cout << A-B << endl; }
a.cc: In function 'int main()': a.cc:6:11: error: expected primary-expression before 'int' 6 | (double)int A, B; | ^~~ a.cc:9:7: error: 'A' was not declared in this scope 9 | if (A < B) { | ^ a.cc:9:11: error: 'B' was not declared in this scope 9 | if (A < B) { | ...
s009784953
p03844
C++
#include <iostream> using namespace std; int main(void) { int(double) A, B; string op; if (A < B) { if (op == "+") { cout << A+B << endl; } else { cout << "-" << B-A << endl; } else { if (op == "+") { cout << A+B << endl; } else { cout << A-B << endl; }
a.cc: In function 'int main()': a.cc:6:3: error: expected primary-expression before 'int' 6 | int(double) A, B; | ^~~ a.cc:9:7: error: 'A' was not declared in this scope 9 | if (A < B) { | ^ a.cc:9:11: error: 'B' was not declared in this scope 9 | if (A < B) { | ^ a...
s357668847
p03844
C++
#include <bits/stdc++.h> using namespace std; int main () { int A, B; char op; cin >> A >> op >> B; if(op == +) { cout << A + B << endl; } else { cout << A - B << endl; } }
a.cc: In function 'int main()': a.cc:9:13: error: expected primary-expression before ')' token 9 | if(op == +) { | ^
s864499583
p03844
C++
#include <bits/stdc++.h> using namespace std; int main () { int A, B; char op; cin >> A >> op >> B; cout << A op B << endl; }
a.cc: In function 'int main()': a.cc:9:12: error: expected ';' before 'op' 9 | cout << A op B << endl; | ^~~ | ;
s795172073
p03844
C++
#include <bits/stdc++.h> using namespace std; int main () { int A, B; string op; cin >> A >> op >> B; if(op == +) { cout << A + B << endl; } else { cout << A - B << endl; } }
a.cc: In function 'int main()': a.cc:9:13: error: expected primary-expression before ')' token 9 | if(op == +) { | ^
s208862580
p03844
C++
#include <bits/stdc++.h> using namespace std; int main () { int A, B; string op; cin >> A >> op >> B; cout << A op B << endl; }
a.cc: In function 'int main()': a.cc:9:12: error: expected ';' before 'op' 9 | cout << A op B << endl; | ^~~ | ;
s976531003
p03844
C++
#include<iostream> using namespace std; int main(){ int a, b; char op; cin >> a >> op >> b; if(op == +){ cout << a + b << endl; }else{ cout << a - b << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:13: error: expected primary-expression before ')' token 9 | if(op == +){ | ^
s252910097
p03844
C++
#include <bits/stdc++.h> using namespace std; int main () { int A, B; string op; cout << A op B << endl; }
a.cc: In function 'int main()': a.cc:8:12: error: expected ';' before 'op' 8 | cout << A op B << endl; | ^~~ | ;
s120989175
p03844
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,c; string s; cin >>a>>s>>c; if(s=='+') cout<<a+c; if(s=='-') cout<<a-c; }
a.cc: In function 'int main()': a.cc:7:7: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 7 | if(s=='+') | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} In file include...
s420742267
p03844
C++
#include <iostream> #include <stdio.h> #include <string.h> #include <algorithm> #include <array> #include <cfloat> using namespace std; int main (){ int a,c; char b; cin >> a >> b >> c; if(b=="+"){ cout << a + c; }else{ cout << a - c; } }
a.cc: In function 'int main()': a.cc:12:5: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 12 | if(b=="+"){ | ~^~~~~
s983917332
p03844
C++
#include <iostream> #include <stdio.h> #include <string.h> #include <algorithm> #include <array> #include <cfloat> using namespace std; int main (){ int a,c; char b; cin >> a >> b >> c; if(b=="+"){ cout << a + c; } cout << "vowel"; }else{ cout << a - c; } }
a.cc: In function 'int main()': a.cc:12:5: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 12 | if(b=="+"){ | ~^~~~~ a.cc: At global scope: a.cc:16:2: error: expected unqualified-id before 'else' 16 | }else{ | ^~~~ a.cc:19:1: error: expected declaration before '}' toke...
s783062290
p03844
C++
#include <iostream> #include <stdio.h> #include <string.h> #include <algorithm> #include <array> #include <cfloat> using namespace std; int main (){ char a,b,c; cin >> c; if(b=="+"){ cout << a + c; } cout << "vowel"; }else{ cout << a - c; } }
a.cc: In function 'int main()': a.cc:11:5: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | if(b=="+"){ | ~^~~~~ a.cc: At global scope: a.cc:15:2: error: expected unqualified-id before 'else' 15 | }else{ | ^~~~ a.cc:18:1: error: expected declaration before '}' toke...
s839115133
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; string op; cin >> A >> B ; cin >> op ; if (op == '+'){ cout << A + B << endl; } else if(op == '-'){ cout << A - B << endl; } }
a.cc: In function 'int main()': a.cc:10:11: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 10 | if (op == '+'){ | ~~ ^~ ~~~ | | | | | char | std::string {aka std::__cxx11::basic_stri...
s373503788
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; char op; cin >> A >> B ; cin >> op ; if (op == '+'){ cout << A op B <<endl; } else if(op == '-'){ cout << A op B << endl; } }
a.cc: In function 'int main()': a.cc:11:15: error: expected ';' before 'op' 11 | cout << A op B <<endl; | ^~~ | ; a.cc:15:12: error: expected ';' before 'op' 15 | cout << A op B << endl; | ^~~ | ;
s141093462
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A char op int B; cin >> A >> B ; cin >> op ; if (op == '+'){ cout << A + B <<endl; } else if(op == '-'){ cout << A - B << endl; } }
a.cc: In function 'int main()': a.cc:6:3: error: expected initializer before 'char' 6 | char op | ^~~~ a.cc:9:9: error: 'A' was not declared in this scope 9 | cin >> A >> B ; | ^ a.cc:9:14: error: 'B' was not declared in this scope 9 | cin >> A >> B ; | ^ a.cc:10...
s401616445
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; string op; cin >> A >> op >> B ; if (op == '+'){ cout << A + B <<endl; } else{ cout << A - B << endl; } }
a.cc: In function 'int main()': a.cc:9:11: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 9 | if (op == '+'){ | ~~ ^~ ~~~ | | | | | char | std::string {aka std::__cxx11::basic_strin...
s346019075
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; string op; cin >> A >> op >> B ; if (op == +){ cout << A + B <<endl; } else{ cout << A - B << endl; } }
a.cc: In function 'int main()': a.cc:9:15: error: expected primary-expression before ')' token 9 | if (op == +){ | ^
s413002212
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; string op; cin >> A >> op >> B ; if (op == +){ cout << A + B << } else{ cout << A - B << endl; } }
a.cc: In function 'int main()': a.cc:9:15: error: expected primary-expression before ')' token 9 | if (op == +){ | ^ a.cc:11:4: error: expected primary-expression before '}' token 11 | } | ^
s281419321
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; string op; cin >> A >> op >> B ; cout << A op B << endl; }
a.cc: In function 'int main()': a.cc:10:12: error: expected ';' before 'op' 10 | cout << A op B << endl; | ^~~ | ;
s903308823
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, op, B; cin >> A >> op >> B ; cout << A op B << endl; } }
a.cc: In function 'int main()': a.cc:9:12: error: expected ';' before 'op' 9 | cout << A op B << endl; | ^~~ | ; a.cc: At global scope: a.cc:12:1: error: expected declaration before '}' token 12 | } | ^
s261834440
p03844
C++
#include<bits/stdc++.h> using namespace std int main(){ int a,b;char c; cin >> a >> c >> b; if(c == '+') cout << a+b; else cout << a-b; }
a.cc:3:20: error: expected ';' before 'int' 3 | using namespace std | ^ | ; ...... 6 | int main(){ | ~~~
s321783570
p03844
C++
#include<stdio.h> int main(void) { int a,b; char op; scanf("%d",&a); scanf("%c",&op); scanf("%d",&b); if(op=='+'){ c=a+b; } if(op=='-'){ c=a-b; } printf("%d\n",&c); return 0; }
a.cc: In function 'int main()': a.cc:10:17: error: 'c' was not declared in this scope 10 | c=a+b; | ^ a.cc:13:17: error: 'c' was not declared in this scope 13 | c=a-b; | ^ a.cc:15:24: error: 'c' was not declared in this scope 15 | ...
s876476579
p03844
C++
#include<stdio.h> int main(void) { int a,b; char op; scanf("%d",&a); scanf("%c",&op); scanf("%d",&b); if(op=='+'){ c=a+b; } if(op=='-'){ c=a-b; } printf("%d",&c); return 0; }
a.cc: In function 'int main()': a.cc:10:17: error: 'c' was not declared in this scope 10 | c=a+b; | ^ a.cc:13:17: error: 'c' was not declared in this scope 13 | c=a-b; | ^ a.cc:15:22: error: 'c' was not declared in this scope 15 | ...
s070697280
p03844
C++
#include<stdio.h> int main(void) { int a,b; char o; scanf("%d",&a); scanf("%c",&op); scanf("%d",&b); if(op=='+'){ printf("%d",a+b); } if(op=='-'){ printf("%d",a-b); } return 0; }
a.cc: In function 'int main()': a.cc:7:21: error: 'op' was not declared in this scope; did you mean 'o'? 7 | scanf("%c",&op); | ^~ | o
s962702165
p03844
C++
#include <bits/stdc++.h> #include<algorithm> #include<math.h> using namespace std; template <class T> using V = vector<T>; using ll = long long; using db = double; using st = string; using ch = char; using vll = V<ll>; using vpll =V<pair<ll,ll>>; using vst = V<st>; using vdb = V<db>; using vch = V<ch>; #define ...
a.cc: In function 'int main()': a.cc:83:3: error: 'else' without a previous 'if' 83 | else co(a-b) | ^~~~
s215433899
p03844
C++
main = do n <- words <$> getLine let l = read $ head n let op = head $ tail n let r = read $ last n putStrLn $ biop op l r biop :: String -> Int -> Int -> String biop o l r | o == "+" = show $ l + r | o == "-" = show $ subtract r l | otherwise = undefined
a.cc:1:1: error: 'main' does not name a type 1 | main = do | ^~~~
s738162727
p03844
C++
#include <bits/stdc++.h> using namespace std; int main (){ int A,B; char op; cin>>A>>op>>B; if(op == '+'){ cout<<A+B<<endl; }else{ cout<<A-B<<endl; }
a.cc: In function 'int main()': a.cc:12:2: error: expected '}' at end of input 12 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main (){ | ^
s918301747
p03844
C++
A,op,B = input().split() print(int(A)+int(B) if op == "+" else int(A)-int(B))
a.cc:1:1: error: 'A' does not name a type 1 | A,op,B = input().split() | ^
s914042396
p03844
C++
#include<iostream> #include<string> using namespace std; int main(){ int a,b;string s;cin>>a>>s>>b; if(s=='+')cout<<a+b; else cout<<a-b; }
a.cc: In function 'int main()': a.cc:6:7: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 6 | if(s=='+')cout<<a+b; | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} In fi...
s908210358
p03844
C++
#include<iostream> #include<string> int main(){ int a,b;string s;cin>>a>>s>>b; if(s=='+')cout<<a+b; else cout<<a-b; }
a.cc: In function 'int main()': a.cc:4:11: error: 'string' was not declared in this scope 4 | int a,b;string s;cin>>a>>s>>b; | ^~~~~~ a.cc:4:11: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, fro...
s373110936
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A , B; string op; cin >> A >> op >> B; if(op = '+'){ cout << A+B << endl; }else{ cout << A-B << endl; } }
a.cc: In function 'int main()': a.cc:7:15: error: could not convert 'op.std::__cxx11::basic_string<char>::operator=(43)' from 'std::__cxx11::basic_string<char>' to 'bool' 7 | if(op = '+'){ | ~~~^~~~~ | | | std::__cxx11::basic_string<char>
s811301643
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A; cin >> A; char op; cin >> op; int B; cin >> B; cout << A 'op' B << endl; }
a.cc:10:19: warning: multi-character character constant [-Wmultichar] 10 | cout << A 'op' B << endl; | ^~~~ a.cc: In function 'int main()': a.cc:10:18: error: expected ';' before '\x6f70' 10 | cout << A 'op' B << endl; | ^~~~~ | ...
s294077413
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A; cin >> A; char op; cin >> op; int B; cin >> B; cout << A op B << endl; }
a.cc: In function 'int main()': a.cc:10:18: error: expected ';' before 'op' 10 | cout << A op B << endl; | ^~~ | ;
s511609462
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A; cin >> A; char op; cin >> op; int B; cin >> B; cout << A op B << endl; }
a.cc: In function 'int main()': a.cc:10:18: error: expected ';' before 'op' 10 | cout << A op B << endl; | ^~~ | ;
s741584391
p03844
C++
#include<iostream> #include<string> #include<typeinfo> #include<vector> #include<algorithm> #include<map> #include<iomanip> typedef long long int ll; using namespace std; int main() { int a,b; char c; cin >> a >> op >> b; if(op='+'){ cout << a+b << endl; }else{ cout << a-b << endl; } return 0; }
a.cc: In function 'int main()': a.cc:14:21: error: 'op' was not declared in this scope 14 | cin >> a >> op >> b; | ^~
s114430747
p03844
C++
#include<stdio.h> int main(void) { char op; int a,b,c; scanf("%c",&op); if(op=+) { c=a+b; } if(op=-) { c=a-b; } printf("%d\n",c); return 0; }
a.cc: In function 'int main()': a.cc:7:8: error: expected primary-expression before ')' token 7 | if(op=+) { | ^ a.cc:10:8: error: expected primary-expression before ')' token 10 | if(op=-) { | ^
s122891041
p03844
C++
A,op,B = map(str, input().split()) ans = 0 if op == "+": ans = A + B else: ans = A - B print(ans)
a.cc:1:1: error: 'A' does not name a type 1 | A,op,B = map(str, input().split()) | ^
s199809831
p03844
C
#include <stdio.h> #include <stdlib.h> #include <math.h> unsigned long long int a[999999][999999],i,j,k,l,n,m,x,y; int main() { a[1][1]=1; for(i=1; i<=999999; i++) { if(i%2==0) { a[i][1]=((i-1)*(i-1))+(j-1); for(j=2; j<=i; j++) { a[i...
/tmp/ccPaKZRY.o: in function `main': main.c:(.text+0x12): relocation truncated to fit: R_X86_64_PC32 against symbol `i' defined in .bss section in /tmp/ccPaKZRY.o main.c:(.text+0x22): relocation truncated to fit: R_X86_64_PC32 against symbol `i' defined in .bss section in /tmp/ccPaKZRY.o main.c:(.text+0x35): relocation...
s397083557
p03844
C++
#include<stdio.h> #include<iostream> #include<stdlib.h> #include<string.h> #include<math.h> int main() { using namespace std; long long int i,j,k,d,m,res,rem,sum=0,su=0,r,p; char a[10000],b[10000]; while(gets(a)) { for(i=0; a[i]!=' '; i++) { if(a[i]<='9' && a[i]>='0') ...
a.cc: In function 'int main()': a.cc:10:11: error: 'gets' was not declared in this scope; did you mean 'getw'? 10 | while(gets(a)) | ^~~~ | getw
s232322461
p03844
C++
#include<stdio.h> #include<string.h> #include<math.h> int main() { long long int i,j,k,d,m,res,rem,sum=0,su=0,r,p; char a[10000],b[10000]; while(gets(a)) { for(i=0; a[i]!=' '; i++) { if(a[i]<='9' && a[i]>='0') { b[i] = a[i] - 48; d ...
a.cc: In function 'int main()': a.cc:8:11: error: 'gets' was not declared in this scope; did you mean 'getw'? 8 | while(gets(a)) | ^~~~ | getw
s398921464
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { //int a,c; string a,b,c; cin>>a>>b>>c; if(b=="+") cout<<a+c; else if (b=="-") count<<a-c }
a.cc: In function 'int main()': a.cc:11:26: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 11 | else if (b=="-") count<<a-c | ~^~ | | | ...
s088810454
p03844
Java
import java.util.*; public class shimu{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int A = sc.nextInt(); String op = sc.next(); int B = sc.nextInt(); if (op.equals("+")){ System.out.println(A+B); } else{ ...
Main.java:2: error: class shimu is public, should be declared in a file named shimu.java public class shimu{ ^ 1 error
s398621950
p03844
C++
#include <iostream> #include <string> #include <cmath> #include <sstream> #include <iomanip> using namespace std; int main(int argc, char* argv[]) { int A,B char op; cin >> A >> op >> B; if(op=='+'){ cout << A+B << endl; }else{ cout << A-B << endl; } return 0; }
a.cc: In function 'int main(int, char**)': a.cc:13:9: error: expected initializer before 'char' 13 | char op; | ^~~~ a.cc:15:21: error: 'op' was not declared in this scope 15 | cin >> A >> op >> B; | ^~ a.cc:15:27: error: 'B' was not declared in this scope ...
s553545296
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; string op; cin >> A >> "op" >> B; if ( "op" == "+") { cout << A + B << endl; } else if ( "op" == "-") { cout << A - B << endl; } }
a.cc: In function 'int main()': a.cc:7:10: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'const char [3]') 7 | cin >> A >> "op" >> B; | ~~~~~~~~ ^~ ~~~~ | | | | | const char [3] | st...
s620214214
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; string op; cin >> A >> "op" >> B; if ( "op" == "+") { cout << A + B << endl; } else if ( "op" == "-") { cout << A - B << endl; } }
a.cc: In function 'int main()': a.cc:7:10: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'const char [3]') 7 | cin >> A >> "op" >> B; | ~~~~~~~~ ^~ ~~~~ | | | | | const char [3] | st...
s359775660
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; string "op"; cin >> A >> "op" >> B; if ( "op" == "+") { cout << A + B << endl; } else if ( "op" == "-") { cout << A - B << endl; } }
a.cc: In function 'int main()': a.cc:6:10: error: expected unqualified-id before string constant 6 | string "op"; | ^~~~ a.cc:7:10: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'const char [3]') 7 | cin >> A ...
s205500652
p03844
C++
#include <bits/stdc++.h> #include <numeric> #include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ int a,b, string op; cin >> a >> op >> b; cout << (op=="+"?a+b:a-b) << endl; }
a.cc: In function 'int main()': a.cc:10:12: error: expected initializer before 'op' 10 | string op; | ^~ a.cc:11:17: error: 'op' was not declared in this scope 11 | cin >> a >> op >> b; | ^~
s014955987
p03844
C++
#include <bits/stdc++.h> #include <numeric> #include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ int a,b, string op; cin >> a >> op >> b; cout << (op=='+'?a+b:a-b) << endl; }
a.cc: In function 'int main()': a.cc:10:12: error: expected initializer before 'op' 10 | string op; | ^~ a.cc:11:17: error: 'op' was not declared in this scope 11 | cin >> a >> op >> b; | ^~
s165123251
p03844
C++
read a b c; [ $b = '+' ] && echo $[a+c] || echo $[a-c]
a.cc:1:1: error: 'read' does not name a type 1 | read a b c; [ $b = '+' ] && echo $[a+c] || echo $[a-c] | ^~~~ a.cc:1:13: error: expected unqualified-id before '[' token 1 | read a b c; [ $b = '+' ] && echo $[a+c] || echo $[a-c] | ^
s453556431
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; string op; cin >> a >>op>>b; if(op == "+") cout << a+b << endl; else cout << a-b << endl;
a.cc: In function 'int main()': a.cc:12:23: error: expected '}' at end of input 12 | cout << a-b << endl; | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s461805955
p03844
C++
#include <iostream> using namespace std; int main() { int a, b; string op; cin >> a >> op >> b; if (op == '+') { cout << a + b << endl; } else { cout << a - b << endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:12: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 8 | if (op == '+') { | ~~ ^~ ~~~ | | | | | char | std::string {aka std::__cxx11::basic...
s897632253
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; char op; cin >> a >> op >> b; cout << (op=='+' ? a+b : a-b) endl; }
a.cc: In function 'int main()': a.cc:8:34: error: expected ';' before 'endl' 8 | cout << (op=='+' ? a+b : a-b) endl; | ^~~~~ | ;
s235786722
p03844
C++
#include "pch.h" #include <iostream> #include <string> using namespace std; int main() { int a, b; char op; cin >> a; getchar(); cin >> op; getchar(); cin >> b; if (op == '+')a += b; else a -= b; cout << a << endl; system("pause"); return 0; }
a.cc:1:10: fatal error: pch.h: No such file or directory 1 | #include "pch.h" | ^~~~~~~ compilation terminated.