submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s918735693 | p03844 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main(void){
int a, b;
string op;
cin >> a >> op >> b;
cout << op=="+" ? a+b : a-b << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:19: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'const char [2]')
12 | cout << op=="+" ? a+b : a-b << endl;
| ~~~~~~~~~~^~~~~
| | |
| | const char [2]
| ... |
s104497868 | p03844 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main(void){
int a, b;
string op;
cin >> a >> op >> b;
cout << (op=="+") ? a+b : a-b << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:39: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
12 | cout << (op=="+") ? a+b : a-b << endl;
| ~~~~^~~~~~~
|
s187112195 | p03844 | C++ | #include <string>
using namespace std;
int a , b ;
string op ;
cin >> a >> op >> b ;
if ( op == "+"){
cout << a + b << endl ;
}else{
cout << a - b << endl ;
} | a.cc:6:3: error: 'cin' does not name a type
6 | cin >> a >> op >> b ;
| ^~~
a.cc:7:3: error: expected unqualified-id before 'if'
7 | if ( op == "+"){
| ^~
a.cc:9:4: error: expected unqualified-id before 'else'
9 | }else{
| ^~~~
|
s907770826 | p03844 | C++ | #include <string>
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:6:3: error: 'cin' was not declared in this scope
6 | cin >> a >> op >> b ;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include <string>
+++ |+#include <iostream>
2 | using n... |
s516186938 | p03844 | C++ | #include <string>
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:6:1: error: 'cin' was not declared in this scope
6 | cin >> a >> op >> b ;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include <string>
+++ |+#include <iostream>
2 | using names... |
s060189388 | p03844 | C++ | #include <string>
using namespace std;
int a , b ;
string op ;
cin >> a >> op >> b ;
if ( op == "+")
cout << a + b << endl ;
else
cout << a - b << endl ; | a.cc:5:1: error: 'cin' does not name a type
5 | cin >> a >> op >> b ;
| ^~~
a.cc:6:1: error: expected unqualified-id before 'if'
6 | if ( op == "+")
| ^~
a.cc:8:1: error: expected unqualified-id before 'else'
8 | else
| ^~~~
|
s991058479 | p03844 | C++ | #include <string>
using namespace std;
int a , b ;
string op ;
cin >> a >> op >> b ;
if ( op == "+")
{
cout << a + b << endl ;
}
else
{
cout << a - b << endl ;
} | a.cc:5:1: error: 'cin' does not name a type
5 | cin >> a >> op >> b ;
| ^~~
a.cc:6:1: error: expected unqualified-id before 'if'
6 | if ( op == "+")
| ^~
a.cc:10:1: error: expected unqualified-id before 'else'
10 | else
| ^~~~
|
s587089589 | p03844 | C++ | #include <string>
using namespace std;
int a , b ;
string op ;
cin >> a >> op >> b ;
if ( op == "+")
cout << a + b << endl ;
else
cout << a - b << endl ; | a.cc:5:1: error: 'cin' does not name a type
5 | cin >> a >> op >> b ;
| ^~~
a.cc:6:1: error: expected unqualified-id before 'if'
6 | if ( op == "+")
| ^~
a.cc:8:1: error: expected unqualified-id before 'else'
8 | else
| ^~~~
|
s057076050 | p03844 | C++ | int a , b ;
string op ;
cin >> a >> op >> b ;
if ( op == "+")
cout << a + b << endl ;
else
cout << a - b << endl ; | a.cc:2:1: error: 'string' does not name a type
2 | string op ;
| ^~~~~~
a.cc:3:1: error: 'cin' does not name a type
3 | cin >> a >> op >> b ;
| ^~~
a.cc:4:1: error: expected unqualified-id before 'if'
4 | if ( op == "+")
| ^~
a.cc:6:1: error: expected unqualified-id before 'else'
6 | e... |
s302877582 | 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 ;
} | a.cc: In function 'int main()':
a.cc:6:9: error: expected primary-expression before '>' token
6 | cin > > a >> op >> b ;
| ^
a.cc:6:13: error: no match for 'operator>>' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
6 | cin > > a >> op >> b ;
| ... |
s817607804 | 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 ;
} | a.cc: In function 'int main()':
a.cc:6:9: error: expected primary-expression before '>' token
6 | cin > > a >> op >> b ;
| ^
a.cc:6:13: error: no match for 'operator>>' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
6 | cin > > a >> op >> b ;
| ... |
s182763854 | p03844 | C++ | int a , b ;
string op ;
cin > > a >> op >> b ;
if ( op == "+")
cout << a + b << endl ;
else
cout << a - b << endl ; | a.cc:2:1: error: 'string' does not name a type
2 | string op ;
| ^~~~~~
a.cc:3:1: error: 'cin' does not name a type
3 | cin > > a >> op >> b ;
| ^~~
a.cc:4:1: error: expected unqualified-id before 'if'
4 | if ( op == "+")
| ^~
a.cc:6:1: error: expected unqualified-id before 'else'
6 | ... |
s094403336 | p03844 | C++ | int a , b ;
string op ;
cin > > a >> op >> b ;
if ( op == "+")
cout << a + b << endl ;
else
cout << a - b << endl ; | a.cc:2:1: error: 'string' does not name a type
2 | string op ;
| ^~~~~~
a.cc:3:1: error: 'cin' does not name a type
3 | cin > > a >> op >> b ;
| ^~~
a.cc:4:1: error: expected unqualified-id before 'if'
4 | if ( op == "+")
| ^~
a.cc:6:1: error: expected unqualified-id before 'else'
6 | ... |
s477035018 | p03844 | C++ | int a,b;
string op;
cin>> a >> op >> b;
if ( op == "+" )
cout<< a + b <<endl;
else
cout<< a - b <<endl; | a.cc:2:1: error: 'string' does not name a type
2 | string op;
| ^~~~~~
a.cc:3:1: error: 'cin' does not name a type
3 | cin>> a >> op >> b;
| ^~~
a.cc:4:1: error: expected unqualified-id before 'if'
4 | if ( op == "+" )
| ^~
a.cc:6:1: error: expected unqualified-id before 'else'
6 | els... |
s087039381 | p03844 | C++ | #include<iostream>
using namespace std;
int main(void) {
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:10: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
9 | if (op == '+') cout << a+b << endl;
| ~~ ^~ ~~~
| | |
| | char
| std::string {aka std::__cxx... |
s481625248 | p03844 | C++ | #include<cstdio>
using namespace std;
inline int read(){
char ch=getchar();
int x=0;
while(ch<'0'||ch>'9') ch=getchar();
while(ch>='0'&&ch<='9') x=x*10+(ch^48),ch=getchar();
return x;
}
int main(){
bool f=0;
int a=read();
if(getchar();=='+') f=1;
int b=read();
if(f) printf("%d",a+b);
else printf("%d",a-b);
... | a.cc: In function 'int main()':
a.cc:13:22: error: expected primary-expression before '==' token
13 | if(getchar();=='+') f=1;
| ^~
|
s241911101 | p03844 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
char fh;
cin>>a>fh>>b;
if(fh=='+')
cout<<a+b<<endl;
else
cout<<a-b<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:15: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
7 | cin>>a>fh>>b;
| ~~~~~~^~~~~~
| | |
| | int
| std::... |
s266239503 | p03844 | C++ | #include <iostream>
#include <array>
#include <math.h>
using namespace std;
int main() {
int n;
cin >> n;
int ls[n];
for (int i = 0; i < n; i++) {
cin >> ls[i];
}
sort(ls, ls + n);
if (n % 2 == 0) {
int count = 1;
for (int i = 0; i < n; i++) {
if(ls[i]... | a.cc: In function 'int main()':
a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
15 | sort(ls, ls + n);
| ^~~~
| sqrt
|
s951915058 | p03844 | C++ | #include <iostream>
using namespace std;
int main() {
int a, b, op;
cin >> a >>op >> b;
cout << (a op b) << endl;
} | a.cc: In function 'int main()':
a.cc:8:13: error: expected ')' before 'op'
8 | cout << (a op b) << endl;
| ~ ^~~
| )
|
s157505531 | p03844 | C++ | #include<bits/stdc++.h>
using namespace std;
long long a,b;
string fuhao;
int main()
{
cin>>a>>fuhao>>b;
if(fuhao=='+')cout<<a+b<<endl;
if(fuhao=='-')cout<<a-b<<endl;
if(fuhao=='*')cout<<a*b<<endl;
if(fuhao=='/')cout<<a/b<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:10: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
9 | if(fuhao=='+')cout<<a+b<<endl;
| ~~~~~^~~~~
| | |
| | char
| std::string {aka std::__cxx11::basic_s... |
s253597605 | p03844 | C++ | #include<bits/stdc++.h>
using namespace std;
long long a,b;
string fuhao;
int main()
{
cin>>a>>fuhao>>b;
if(fuhao=='+')cout<<a+b<<endl;
if(fuhao=='-')cout<<a-b<<endl;
if(fuhao=='*')cout<<a*b<<endl;
if(fuhao=='/')cout<<a/b<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:10: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
9 | if(fuhao=='+')cout<<a+b<<endl;
| ~~~~~^~~~~
| | |
| | char
| std::string {aka std::__cxx11::basic_s... |
s812995722 | 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:8:8: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
8 | if(op=='+')cout<<a+b<<endl;
| ~~^~~~~
| | |
| | char
| std::string {aka std::__cxx11::basic_string<ch... |
s765815553 | p03844 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
char s;
cin>>a>>s>>b;
if(s=='+'){
cout<<a+b<<endl;
}
else{
coiut<<a-b<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:12:5: error: 'coiut' was not declared in this scope
12 | coiut<<a-b<<endl;
| ^~~~~
|
s194677189 | p03844 | C++ | #include <bits/stdc++.h>
int main(){
int a,b;
char s;
cin>>a>>s>>b;
if(s=='+'){
cout<<a+b<<endl;
}
else{
coiut<<a-b<<endl;
}
} | a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin>>a>>s>>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/iostream:62:18: note: '... |
s948420312 | p03844 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define boost ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0)
#define pii pair<ll,ll>
#define forn(i,n) for(int i=0;i<n;i++)
#define F first
#define S second
int main()
{
boost;
ll a,b;
... | a.cc: In function 'int main()':
a.cc:18:14: error: expected primary-expression before 'long'
18 | cout<<(long long inr)a+b<<endl;
| ^~~~
a.cc:18:14: error: expected ')' before 'long'
18 | cout<<(long long inr)a+b<<endl;
| ~^~~~
| )
|
s359060688 | p03844 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <functional>
#include <queue>
#include <set>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
using namespace std;
typedef long long int lli;
int main(){
int A,B;
char op;
cin>>A>>op>>B... | a.cc: In function 'int main()':
a.cc:19:18: error: expected ';' before 'A'
19 | else cout A-B;
| ^~
| ;
|
s241927180 | p03844 | C++ | #include<iostream>
#include<string>
using namespace std;
int main (){
int a,b;
string op;
cin>>a>>op>>b;
if(op=="-") {
cont<<a-b;}
else{
cout<<a+b;}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:1: error: 'cont' was not declared in this scope; did you mean 'const'?
9 | cont<<a-b;}
| ^~~~
| const
|
s918634591 | p03844 | C++ | #include<iostream>
#include<string>
using namespace std;
int main (){
int a,b;
string op;
cin>>a>>op>>b;
if(op=="~") {
cont<<a-b;}
else{
cout>>a+b;}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:1: error: 'cont' was not declared in this scope; did you mean 'const'?
9 | cont<<a-b;}
| ^~~~
| const
a.cc:11:5: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
11 | cout>>a+b;}
| ~~~~^~~~~
... |
s639369932 | p03844 | C | #include <stdio.h>
a;b;char c;
main{
scanf("%d%c%d",&a,&c,&b);
if(c-'-')printf("%d\n",a+b);
else printf("%d\n",a-b);
} | main.c:2:1: warning: data definition has no type or storage class
2 | a;b;char c;
| ^
main.c:2:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:2:3: warning: data definition has no type or storage class
2 | a;b;char c;
| ^
main.c:2:3: error: type defaults to 'int' in ... |
s229255203 | p03844 | C | a;b;char c;
main{
scanf("%d%c%d",&a,&c,&b);
if(c-'-')printf("%d\n",a+b);
else printf("%d\n",a-b);
} | main.c:1:1: warning: data definition has no type or storage class
1 | a;b;char c;
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:3: warning: data definition has no type or storage class
1 | a;b;char c;
| ^
main.c:1:3: error: type defaults to 'int' in ... |
s021651351 | p03844 | C | int main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);} | main.c: In function 'main':
main.c:1:12: error: 'a' undeclared (first use in this function)
1 | int main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}
| ^
main.c:1:12: note: each undeclared identifier is reported only once for each function it appears i... |
s269838107 | p03844 | C | main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}
| ^~~~
main.c: In function 'main':
main.c:1:8: error: 'a' undeclared (first use in this function)
1 | main(){a;b;char c;scanf("%d%c%d",&a,&... |
s375203983 | p03844 | C | main{
a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);} | main.c:1:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
1 | main{
| ^
|
s293791804 | p03844 | C | main{a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);} | main.c:1:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
1 | main{a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}
| ^
|
s232611699 | p03844 | C | a;b;char c;
main{scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);} | main.c:1:1: warning: data definition has no type or storage class
1 | a;b;char c;
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:3: warning: data definition has no type or storage class
1 | a;b;char c;
| ^
main.c:1:3: error: type defaults to 'int' in ... |
s320610902 | p03844 | Java | import java.util.*;
public class Main{
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 == "+")System.out.println(A+B);
else System.out.pritnln(A-B);
}
} | Main.java:9: error: cannot find symbol
else System.out.pritnln(A-B);
^
symbol: method pritnln(int)
location: variable out of type PrintStream
1 error
|
s169623474 | p03844 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char **argv)
{
char a[100];
char p[10];
int b,c,d;
strcpy(p,"+")
scanf("%d %s %d",&b,a,&c);
d = strcmp(p,a);
if(d==0){
printf("%d\n", b+c);
}
else{
printf("%d\n", b-c);
}
return 0;
} | main.c: In function 'main':
main.c:10:22: error: expected ';' before 'scanf'
10 | strcpy(p,"+")
| ^
| ;
11 | scanf("%d %s %d",&b,a,&c);
| ~~~~~
|
s816636921 | p03844 | C++ | #include<cstdio>
int main()
{
int a,c;
char b,n,m;
int sum;
while(scanf("%d",&a)!=EOF)
{
scanf("%c",&m);
scanf("%c",&b);
scanf("%c",&n);
scanf("%d",&c);
if(b==43)
{
sum=a+c;
printf("%d\n",sum);
}
else
{
sum=a-c;
printf("%d\n",sum);
}
}
return 0; | a.cc: In function 'int main()':
a.cc:25:19: error: expected '}' at end of input
25 | return 0;
| ^
a.cc:3:1: note: to match this '{'
3 | {
| ^
|
s348862509 | p03844 | C | #include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
int a,b;
char str;
scanf("%d%c%d",&a,&str,&b);
if(str=='-')
printf("%d",a-b);
else
printf("%d",a+b);
return 0;
} | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s980598364 | p03844 | Java | import java.util.Scanner;
public class abc_A50 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int a=sc.nextInt();
String s = sc.next();
int b=sc.nextInt();
if(s.equals("+")){
System.out.println(a+b);
}else if(s.equals("-")){
Syste... | Main.java:3: error: class abc_A50 is public, should be declared in a file named abc_A50.java
public class abc_A50 {
^
1 error
|
s738311074 | p03844 | C++ | #include<iostresm>
using namespace std;
int main(){
long long int A,B;
char op;
cin>>A>>op>>B;
if(op=='+') cout<<A+B<<endl;
if(op=='-') cout<<A-B<<endl;
return 0;
} | a.cc:1:9: fatal error: iostresm: No such file or directory
1 | #include<iostresm>
| ^~~~~~~~~~
compilation terminated.
|
s477063354 | p03844 | C | #include"stdio.h"
int main(){
int N;
scanf("%d",&N);
int po[N];
for(int i=0;i<N;i++){po[i]=(N-i)%2;
po[i]*=2;
if(po[0]==2)po[0]=1;}
for(int i=0;i<N;i++){
int kari;
scanf("%d",&kari);
po[kari]--;}
for(int i=0;i<N;i++)if(po[i]!=0){printf("0\n");return 0;}
int ans=1;
for(int i=0;i<N/2;i++)ans(ans*2)%1000000007;
printf("%d... | main.c: In function 'main':
main.c:15:23: error: called object 'ans' is not a function or function pointer
15 | for(int i=0;i<N/2;i++)ans(ans*2)%1000000007;
| ^~~
main.c:14:5: note: declared here
14 | int ans=1;
| ^~~
|
s240830523 | p03844 | C | #include"stdio.h"
int main(){int N;scanf("%d",&N);int po[N];for(int i=0;i<N;i++)po[i]=2*((N-i)%2);for(int i=0;i<N;i++){int kari;scanf("%d",&kari);po[kari]--;}for(int i=0;i<N;i++)if(po[i]!=0){printf("0\n");return 0;}int ans=1;for(int i=0;i<N/2;i++)ans=(ans*2)%1000000007;printf("%d\n",ans);return 0;}
| main.c:2:1: error: stray '\302' in program
2 | <U+00A0>int main(){int N;scanf("%d",&N);int po[N];for(int i=0;i<N;i++)po[i]=2*((N-i)%2);for(int i=0;i<N;i++){int kari;scanf("%d",&kari);po[kari]--;}for(int i=0;i<N;i++)if(po[i]!=0){printf("0\n");return 0;}int ans=1;for(int i=0;i<N/2;i++)ans=(ans*2)%1000000007;printf("%... |
s637258990 | p03844 | C | #include"stdio.h" int main(){int a,b;char nari;scanf("%d %c %d",&a,&nari,&b);if(nari=='+')printf("%d\n",a+b);else printf("%d\n",a-b);return 0;}
| main.c:1:18: warning: extra tokens at end of #include directive
1 | #include"stdio.h" int main(){int a,b;char nari;scanf("%d %c %d",&a,&nari,&b);if(nari=='+')printf("%d\n",a+b);else printf("%d\n",a-b);return 0;}
| ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1... |
s640399948 | p03844 | C | #include"stdio.h" int main(){int a,b;char nari;scanf("%d %c %d",&a,&nari,&b);if(nari=='+')printf("%d\n",a+b);else printf("%d\n",a-b);return 0;}
| main.c:1:18: warning: extra tokens at end of #include directive
1 | #include"stdio.h" int main(){int a,b;char nari;scanf("%d %c %d",&a,&nari,&b);if(nari=='+')printf("%d\n",a+b);else printf("%d\n",a-b);return 0;}
| ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1... |
s676000960 | p03844 | C | #include"stdio.h"
int main()
{
int a,b;
char nari;
scanf("%d %c %d",&a,&nari,&b);
if(c=='+')printf("%d\n",a+b);
else printf("%d\n",a-b);
return 0;
} | main.c: In function 'main':
main.c:8:4: error: 'c' undeclared (first use in this function)
8 | if(c=='+')printf("%d\n",a+b);
| ^
main.c:8:4: note: each undeclared identifier is reported only once for each function it appears in
|
s162312450 | p03844 | C | #include <iostream>
#include <climits>
#include <string>
#include <string.h>
#include <stdlib.h>
#include <algorithm>
using namespace std;
long long int i,j,ans=1;
int ascSort(const void* v1, const void* v2) {
const int _v1 = *((const int*)v1);
const int _v2 = *((const int*)v2);
if ( _v1 < _v2 ) {
... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s763427838 | p03844 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
string s;
cin >> a >> s >> b;
if(s=='+')
cout << a+b << endl;
else{
cout << a-b << endl;
}
} | a.cc: In function 'int main()':
a.cc:8:13: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
8 | if(s=='+')
| ~^~~~~
| | |
| | char
| std::string {aka std::__cxx11::basi... |
s101437071 | p03844 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String s = sc.next();
int m = sc.nextInt();
if(s.equals("+")){
System.out.println(n + m);
}else{
Syetem.out.println(n - m);
}
}
} | Main.java:11: error: package Syetem does not exist
Syetem.out.println(n - m);
^
1 error
|
s000672562 | p03844 | C++ | #include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
int a,c;
string b;
cin >> a >> b >> c;
if(b=="+"){
cout << a+c << endl;
}else if(b=="-"){a
cout << a-c << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:27: error: expected ';' before 'cout'
12 | }else if(b=="-"){a
| ^
| ;
13 | cout << a-c << endl;
| ~~~~
|
s942701373 | p03844 | C++ | #include <iostream>
int main(){
int a,b;char c;
std::cin >>a>>c>>b;
std::cout<<(c=='+'?a+b:a-b<<std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:27: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
5 | std::cout<<(c=='+'?a+b:a-b<<std::endl;
| ~~~^~~~~~~~~~~
a.cc:5:38: error: expected ')' before ';' token
5 | std::cout<<(c=='+'?a+b... |
s176353421 | p03844 | C++ | #include <iostream>
int main(){
int a,b;char c;
std::cin >>a>>c>>b;
std::cout<<(c=='+'?a+b:a-b)<<std::endl;
resurn 0;
} | a.cc: In function 'int main()':
a.cc:6:1: error: 'resurn' was not declared in this scope
6 | resurn 0;
| ^~~~~~
|
s071453783 | p03844 | C++ | #include <iostream>
int main(){
int a,b;char c;
std::cin >>a>>c>>b;
std::cout<<(c=='+'?a+b:a-b<<std::endl;
resurn 0;
} | a.cc: In function 'int main()':
a.cc:5:27: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
5 | std::cout<<(c=='+'?a+b:a-b<<std::endl;
| ~~~^~~~~~~~~~~
a.cc:5:38: error: expected ')' before ';' token
5 | std::cout<<(c=='+'?a+b... |
s792732867 | p03844 | C++ | main(){int a,b;char o;scanf("%d%s%d",a,o,b);printf("%d",o=='+'?a+b:a-b);}
| a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | main(){int a,b;char o;scanf("%d%s%d",a,o,b);printf("%d",o=='+'?a+b:a-b);}
| ^~~~
a.cc: In function 'int main()':
a.cc:1:23: error: 'scanf' was not declared in this scope
1 | main(){int a,b;char o;scanf("%d%s%d",a,o,b... |
s309688710 | p03844 | C++ | #include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
#include <boost/multiprecision/cpp_int.hpp>
using na... | a.cc:7:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
7 | #include <boost/multiprecision/cpp_int.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s730775979 | p03844 | C++ | #include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
#include <boost/multiprecision/cpp_int.hpp>
using na... | a.cc:7:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
7 | #include <boost/multiprecision/cpp_int.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s868858530 | p03844 | C++ | #include<iostream>
#include<string>
using namespace std;
int main()
{
int a ,b;
string op;
cin>a>>op>>b;
if(op=="+")
{
cout<<a+b<<endl;
}
if(op=="-")
{
cout<<a-b<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:8: error: no match for 'operator>>' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
8 | cin>a>>op>>b;
| ~^~~~
| | |
| | std::string {aka std::__cxx11::basic_string<char>}
| int
In file inc... |
s423672122 | p03844 | C | #include <stdio.h>
int main(void) {
int a, b;
char op;
scanf("%d %c %d", &a, &op, &b);
printf("%d\n", op == '+' : a + b : a - b);
return 0;
}
| main.c: In function 'main':
main.c:9:33: error: expected ')' before ':' token
9 | printf("%d\n", op == '+' : a + b : a - b);
| ~ ^~
| )
|
s439409264 | p03844 | C++ | print(eval(input())) | a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token
1 | print(eval(input()))
| ^
|
s782182481 | 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;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | if( op == "+" ){
| ~~~^~~~~~
|
s215655795 | 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;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:17: error: expected primary-expression before ')' token
7 | if( op == + ){
| ^
|
s448221393 | 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;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:5: error: expected initializer before 'cin'
6 | cin >> a >> op >> b;
| ^~~
a.cc:7:9: error: 'op' was not declared in this scope
7 | if( op == + ){
| ^~
a.cc:7:17: error: expected primary-expression before ')' token
7 | if( op == + ){... |
s809608245 | p03844 | C++ | #include<bits/stdc++.h>
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:6:13: error: expected primary-expression before ')' token
6 | if( op == + ){
| ^
|
s931103581 | p03844 | C++ | #include <iostream>
using namespace std;
int main(){
int a,b;
char c;
cin >> a >> c >> b;
if(c == "+")cout << a+b << endl;
else if(c == "-")cout << a-b << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
10 | if(c == "+")cout << a+b << endl;
| ~~^~~~~~
a.cc:11:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
11 | else if(c == "-")... |
s321574543 | p03844 | C++ | #include<bits/stdc++.h>
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:6:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
6 | if( op == "+" ){
| ~~~^~~~~~
|
s888896412 | 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 << endl;
else if(c == -)cout << a-b << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:18: error: expected primary-expression before ')' token
10 | if(c == +)cout << a+b << endl;
| ^
a.cc:11:23: error: expected primary-expression before ')' token
11 | else if(c == -)cout << a-b << endl;
| ^
|
s112963840 | p03844 | C++ | #include <iosteam>
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:1:10: fatal error: iosteam: No such file or directory
1 | #include <iosteam>
| ^~~~~~~~~
compilation terminated.
|
s183094026 | p03844 | C++ | #define rep(i,n) FOR(i,0,n)
#define pb push_back
#define mp make_pair
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define rmsame(a) sort(all(a)),a.erase(unique(all(a)), a.end())
#define rmvector(a,b) rep(i,a.size())rep(j,b.size())if(a[i]==b[j]){a.erase(a.begin()+i);i--;break;}
int main(){
ci... | a.cc: In function 'int main()':
a.cc:10:3: error: 'cin' was not declared in this scope
10 | cin.tie(0);
| ^~~
a.cc:11:3: error: 'ios' has not been declared
11 | ios::sync_with_stdio(false);
| ^~~
a.cc:13:3: error: 'll' was not declared in this scope; did you mean 'all'?
13 | ll A,B;
... |
s481210087 | p03844 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<algorithm>
#include<cmath>
#include<queue>
#include<vector>
#include<stack>
using namespace std;
#define REP(i,n) for(int i=0;(i)<(n);(i)++)
#define ll long long
int main() {
int a,b;
string s;
ci... | a.cc: In function 'int main()':
a.cc:22:19: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
22 | cout << (s=='+'?a+b:a-b) << endl;
| ~^~~~~
| | |
| | char
| ... |
s533097958 | p03844 | C++ | #include<bits/stdc++.h>
using namespace std;
char s[100];
int ac,a,b,c,d;
int main(){
gets(s);
int len=strlen(s);
d=0; a=b=0;
for (int i=0; i<len; i++){
if (s[i]>='0'&&s[i]<='9'){
if (!d) a=a*10+s[i]-48;
else b=b*10+s[i]-48;
}
else if (s[i]=='+') c=1,d=1;
else if (s[i]=='-') c=-1,d=1;
}
printf("%d\n... | a.cc: In function 'int main()':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(s);
| ^~~~
| getw
|
s905197516 | p03844 | C++ | #include<bits/stdc++.h>
using namespace std;
char s[100];
int ac,a,b,c,d;
int main(){
gets(s);
int len=strlen(s);
d=0; a=b=0;
for (int i=0; i<len; i++){
if (s[i]>='0'&&s[i]<='9'){
if (!d) a=a*10+s[i]-48;
else b=b*10+s[i]-48;
}
else if (s[i]=='+') c=1,d=1;
else if (s[i]=='-') c=-1,d=1;
}
printf("%d\n... | a.cc: In function 'int main()':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(s);
| ^~~~
| getw
|
s715862986 | p03844 | C++ | #include<cstdio>
#include<cstring>
#include<cstdlib>
#include<string>
using namespace std;
char s[100];
int ac,a,b,c,d;
int main(){
gets(s);
int len=strlen(s);
d=0; a=b=0;
for (int i=0; i<len; i++){
if (s[i]>='0'&&s[i]<='9'){
if (!d) a=a*10+s[i]-48;
else b=b*10+s[i]-48;
}
else if (s[i]=='+') c=1,d=1;
... | a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(s);
| ^~~~
| getw
|
s494503145 | p03844 | C++ | #include<cstdio>
#include<cstring>
char s[100],len,i;
int ac,a,b,c,d;
int main(){
gets(s);
len=strlen(s);
d=0; a=b=0;
for (i=0; i<len; i++){
if (s[i]>='0'&&s[i]<='9'){
if (!d) a=a*10+s[i]-48;
else b=b*10+s[i]-48;
}
else if (s[i]=='+') c=1,d=1;
else if (s[i]=='-') c=-1,d=1;
}
printf("%d\n",a+c*b);
r... | a.cc: In function 'int main()':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(s);
| ^~~~
| getw
|
s537715939 | p03844 | C++ | $0=($2=="+"?$1+$3:$1-$3)"" | a.cc:1:1: error: '$0' does not name a type
1 | $0=($2=="+"?$1+$3:$1-$3)""
| ^~
|
s891841919 | p03844 | C++ | 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:3:9: error: 'string' was not declared in this scope
3 | string op;
| ^~~~~~
a.cc:4:9: error: 'cin' was not declared in this scope
4 | cin >> A >>op>> B;
| ^~~
a.cc:4:20: error: 'op' was not declared in this scope
4 | ci... |
s636508707 | p03844 | C++ | #include <iostream>
using namespace std;
int main() {
// your code goes here
long long int a,b;
char x;
cin>>a;
cin>>x;
cin>>b;
if(x == '+')
cout<<a+b<<:"\n";
else
cout<<a-b<<"\n";
return 0;
}
| a.cc: In function 'int main()':
a.cc:14:24: error: expected primary-expression before ':' token
14 | cout<<a+b<<:"\n";
| ^
|
s108207028 | 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:9:14: 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:... |
s478415669 | p03844 | C++ | #include<stdio.h>
int main(void){
int a,b;
char c;
scanf("%d %c %d",&a,&c,&b);
if(c='+'){pritf("%d",a+b);}
else{printf("%d",a-b);}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:11: error: 'pritf' was not declared in this scope; did you mean 'printf'?
6 | if(c='+'){pritf("%d",a+b);}
| ^~~~~
| printf
|
s807916554 | p03844 | C++ | package main
import (
"fmt"
)
func main(){
var a,b int
var o string
fmt.Scan(&a, &o, &b)
if o == "-" {
fmt.Println(a-b)
} else if o == "+" {
fmt.Println(a+b)
}
} | a.cc:1:1: error: 'package' does not name a type
1 | package main
| ^~~~~~~
|
s609431439 | p03844 | C++ | #include <iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
char t;
if(t=="+"){
cout<<a+b;
}
if(t=="-"){
cout<<a-b;
}
} | a.cc: In function 'int main()':
a.cc:7:5: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | if(t=="+"){
| ~^~~~~
a.cc:10:5: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
10 | if(t=="-"){
| ~^~~~~
|
s931317632 | p03844 | Java | import java.util.*;
public class AdditionandSubtractionEasy {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner s=new Scanner(System.in);
int A=s.nextInt();
String op=s.next();
int B=s.nextInt();
if(op.charAt(0)=='+'){
System.out.print(A+B);
}else System.out.prin... | Main.java:3: error: class AdditionandSubtractionEasy is public, should be declared in a file named AdditionandSubtractionEasy.java
public class AdditionandSubtractionEasy {
^
1 error
|
s120815889 | p03844 | Java | import java.util.Scanner;
public class joisino {
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 if(op.equals("-")){
System.out.print(A - B);
}
... | Main.java:3: error: class joisino is public, should be declared in a file named joisino.java
public class joisino {
^
1 error
|
s882461639 | p03844 | Java | import java.util.Scanner;
public class joisino {
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 if(op.equals("-")){
System.out.print(A - B);
}
... | Main.java:3: error: class joisino is public, should be declared in a file named joisino.java
public class joisino {
^
1 error
|
s541062963 | p03844 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
char op = sc.next();
int B = sc.nextInt();
if(op.equals("+"))System.out.println(A + B);
if(op.equals("-"))System.out.println(A - B);
}
} | Main.java:6: error: incompatible types: String cannot be converted to char
char op = sc.next();
^
Main.java:8: error: char cannot be dereferenced
if(op.equals("+"))System.out.println(A + B);
^
Main.java:9: error: char cannot be dereferenced
if(op.equals("-"))System.out.println(A - B);
... |
s792210206 | p03844 | C++ | #include <bits/stdc++.h>
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:8:15: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
8 | cout << (op == '+' ? a + b : a - b) << endl;
| ~~ ^~ ~~~
| | |
| | char
| ... |
s625365420 | p03844 | Java | public static void main (String args[]){
int A=3;
int B=5;
if(op == -){
A op B=answer;
System.out.print(answer);
}
} | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main (String args[]){
^
(use --enable-preview to enable unnamed classes)
Main.java:4: error: illegal start of expression
if(op == -){
^
Main.java:5: error: ';' expected
A op B=answer;
... |
s979046374 | p03844 | C++ | (defun main ()
(setq a (read))
(setq or (read-line))
(setq b (read))
(cond ((= or +) (format t "~A~%" (+ a b)))
(= or -) (format " ~A~%" (- a b))))
(main) | a.cc:1:7: error: expected ')' before 'main'
1 | (defun main ()
| ~ ^~~~~
| )
|
s729649113 | p03844 | C++ | #include <iostream>
#include <cstdio>
#include <string>
#include <sstream>
#include <vector>
using namespace std;
int stoi(std::string str){
int ret;
std::stringstream ss;
ss<<str;
ss>>ret;
return ret;
}
vector<string> split(const string &s, char delim) {
vector<string> elems;
stringstream ss(s);
... | a.cc: In function 'int main()':
a.cc:42:11: error: call of overloaded 'stoi(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)' is ambiguous
42 | a = stoi(ans[0]);
| ~~~~^~~~~~~~
a.cc:9:5: note: candidate: 'int stoi(std::string)... |
s986684906 | p03844 | C++ | #include <iostream>
#include <cstdio>
#include <string>
#include <sstream>
#include <vector>
using namespace std;
int stoi(std::string str){
int ret;
std::stringstream ss;
ss<<str;
ss>>ret;
return ret;
}
vector<string> split(const string &s, char delim) {
vector<string> elems;
stringstream ss(s);
... | a.cc: In function 'int main()':
a.cc:42:11: error: call of overloaded 'stoi(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)' is ambiguous
42 | a = stoi(ans[0]);
| ~~~~^~~~~~~~
a.cc:9:5: note: candidate: 'int stoi(std::string)... |
s193650858 | p03844 | C | #include <iostream>
#include <cstdio>
#include <string>
#include <sstream>
#include <vector>
using namespace std;
int stoi(std::string str){
int ret;
std::stringstream ss;
ss<<str;
ss>>ret;
return ret;
}
vector<string> split(const string &s, char delim) {
vector<string> elems;
stringstream ss(s);
... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s239085557 | p03844 | C++ | #include <iostream>
#include <cstdio>
#include <string>
#include <sstream>
#include <vector>
using namespace std;
int stoi(std::string str){
int ret;
std::stringstream ss;
ss<<str;
ss>>ret;
return ret;
}
vector<string> split(const string &s, char delim) {
vector<string> elems;
stringstream ss(s);
... | a.cc: In function 'int main()':
a.cc:42:11: error: call of overloaded 'stoi(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)' is ambiguous
42 | a = stoi(ans[0]);
| ~~~~^~~~~~~~
a.cc:9:5: note: candidate: 'int stoi(std::string)... |
s694328931 | p03844 | C++ | package main
import (
"fmt"
)
func main() {
var x, y int64
var s string
fmt.Scan(&x, &s, &y)
var ans int64
if s == "+" {
ans = x + y
} else {
ans = x - y
}
fmt.Println(ans)
}
func Min(x, y int64) int64 {
if x < y {
return x
}
return y
}
func Max(x, y int64) int64 {
if x > y {
return x
}
retur... | a.cc:1:1: error: 'package' does not name a type
1 | package main
| ^~~~~~~
a.cc:20:1: error: 'func' does not name a type
20 | func Min(x, y int64) int64 {
| ^~~~
a.cc:27:1: error: 'func' does not name a type
27 | func Max(x, y int64) int64 {
| ^~~~
|
s247488240 | p03844 | Java | public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
System.out.print(" ");
Scanner sc = new Scanner(System.in);
//人数
int N = sc.nextInt();
int[] A = new int[N];
//絶対値の入力
int[] a = new int[N];
double P;
for(int i = 0; i < N ;i++){
a[i] = sc.nextInt();
A[i] = Math.abs((2 * i... | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
^
(use --enable-preview to enable unnamed classes)
1 error
|
s836329258 | p03844 | C++ | #include<iostream>
#include<string>
using namespace std;
string S;int a,b;
int main(){
cin>>a>>S>>b;
if(S=="+")cout<a+b<<endl;
else cout<<a-b<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:27: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
7 | if(S=="+")cout<a+b<<endl;
| ~~~^~~~~~
|
s824985695 | p03844 | C++ | #include <bits/stdc++.h>
#include <cstdio>
using namespace std;
typedef long long ll;
const int N=2e3;
int main()
{
char s[N];
while(gets(s))
{
int op=0;
int a=0,b=0;
for(int i=0;i<strlen(s);i++)
{
if(s[i]==' ')
continue;
if(s[i]=='+')
{
op=1;
continue;
}
if(s[i]=='-')
{
op=... | a.cc: In function 'int main()':
a.cc:10:15: error: 'gets' was not declared in this scope; did you mean 'getw'?
10 | while(gets(s))
| ^~~~
| getw
|
s118225944 | p03844 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=2e3;
int main()
{
char s[N];
while(gets(s))
{
int op=0;
int a=0,b=0;
for(int i=0;i<strlen(s);i++)
{
if(s[i]==' ')
continue;
if(s[i]=='+')
{
op=1;
continue;
}
if(s[i]=='-')
{
op=2;
continue;
... | a.cc: In function 'int main()':
a.cc:9:15: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | while(gets(s))
| ^~~~
| getw
|
s921412131 | p03844 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO code application logic here
QuestionB a = new QuestionB();
a.print();
}
public class QuestionA {
private static int a;
private static int b;
String op;
Scanner sc... | Main.java:6: error: cannot find symbol
QuestionB a = new QuestionB();
^
symbol: class QuestionB
location: class Main
Main.java:6: error: cannot find symbol
QuestionB a = new QuestionB();
^
symbol: class QuestionB
location: class Main
2 errors
|
s485854813 | p03844 | C | #include<stdio.h>
int main(void)
{
int A,B,result;
char op;
scanf("%d %c %d",&A,&op,&B);
if(op == '+');
{
result = A + B;
}
else
{
result = A - B;
}
printf("%d",result);
return 0;
} | main.c: In function 'main':
main.c:13:2: error: 'else' without a previous 'if'
13 | else
| ^~~~
|
s643511707 | p03844 | C | #include<stdio.h>
int main(void)
{
int A,B,result;
char op;
scanf("%d,%s,%d",&A,&op,&B);
if(op == "+");
{
result = A + B;
}
else
{
result = A - B;
}
printf("%d",result);
return 0;
} | main.c: In function 'main':
main.c:9:7: warning: comparison between pointer and integer
9 | if(op == "+");
| ^~
main.c:13:2: error: 'else' without a previous 'if'
13 | else
| ^~~~
|
s774893185 | p03844 | C | #include<stdio.h>
int main(void)
{
int A,B,result;
char op;
scanf("%d,%s,%d",&A,&op,&B);
if(op == "+");
{
result = A + B;
}
else
{
result = A - B;
}
return 0;
} | main.c: In function 'main':
main.c:9:7: warning: comparison between pointer and integer
9 | if(op == "+");
| ^~
main.c:13:2: error: 'else' without a previous 'if'
13 | else
| ^~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.