submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s542771336 | p03997 | C++ | #include<bits/stdc++.h>
using namesapce std;
int main()
{
int a,b,c;
cin>>a>>b>c;
cout<<(a+b)*c/2;
return 0;
} | a.cc:2:7: error: expected nested-name-specifier before 'namesapce'
2 | using namesapce std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin>>a>>b>c;
| ^~~
| std::cin
In file included from /usr... |
s071808215 | p03997 | C++ | #include<cstdio>
#include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin >> a >> b >> c;
cout << (a+b)*c/2
} | a.cc: In function 'int main()':
a.cc:10:19: error: expected ';' before '}' token
10 | cout << (a+b)*c/2
| ^
| ;
......
14 | }
| ~
|
s773792124 | p03997 | C++ | #include <bits/stdc++.h>
using namespace std;
int a, b, h;
int main () {
cin >> a >> b >> h;
cout << ((a + b) / 2) * h << endl;
} | a.cc:8:27: error: extended character is not valid in an identifier
8 | cout << ((a + b) / 2) * h << endl;
| ^
a.cc: In function 'int main()':
a.cc:8:27: error: 'h\U00003000' was not declared in this scope
8 | cout << ((a + b) / 2) * h << endl;
| ... |
s446351488 | p03997 | C++ | #include <bits/stdc++.h>
using namespace std;
int a, b, h;
int main () {
cin >> a >> b >> h;
cout << (a + b) / 2 * h << endl;
} | a.cc:8:25: error: extended character is not valid in an identifier
8 | cout << (a + b) / 2 * h << endl;
| ^
a.cc: In function 'int main()':
a.cc:8:25: error: 'h\U00003000' was not declared in this scope
8 | cout << (a + b) / 2 * h << endl;
| ^~~
|
s736082314 | p03997 | Java | import jaav.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
System.out.println((a+b)*h/2);
}
} | Main.java:1: error: package jaav.util does not exist
import jaav.util.*;
^
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
s... |
s347913010 | p03997 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
using namespace std;
int main(){
int a,b,c;
cin>>(a+b)/c<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:12: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
9 | cin>>(a+b)/c<<endl;
| ~~~^~~~~~~~~
| | |
| | int
| std::istream {aka std::basi... |
s877736351 | p03997 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
using namespace std;
int main(){
int a,b,c;
cin>>(a+b)/h<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:20: error: 'h' was not declared in this scope
9 | cin>>(a+b)/h<<endl;
| ^
|
s186788179 | p03997 | Java | import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.*;
public class MAIN {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
Scanner in = new Scanner(inputStream);
Pr... | Main.java:5: error: class MAIN is public, should be declared in a file named MAIN.java
public class MAIN {
^
1 error
|
s706485648 | p03997 | C++ | /*
このコード、と~おれ!
Be accepted!
∧_∧
(。・ω・。)つ━☆・*。
⊂ ノ ・゜+.
しーJ °。+ *´¨)
.· ´¸.·*´¨) ¸.·*¨)
(¸.·´ (¸.·'* ☆
*/
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define printyn(test) printf(test ? "YES\n" : "NO\n");
#define all(x) (x).begin(), (x).end()
using ll = long long;
#include <stdio.h>
#... | a.cc: In function 'int main()':
a.cc:28:34: error: 'c' was not declared in this scope
28 | scanf("%d%d%d", &a, &b, &c);
| ^
|
s180974026 | p03997 | C++ | #include <iostream>
using namespace std;
int main(){
int a, b, h
cin >> a >> b >> h;
cout << (a + b) * h / 2;
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:9: error: expected initializer before 'cin'
6 | cin >> a >> b >> h;
| ^~~
a.cc:7:27: error: 'h' was not declared in this scope
7 | cout << (a + b) * h / 2;
| ^
|
s326594288 | p03997 | C++ | #include <bits/stdc++.h>
using namespace;
int main(){
int a, b, h;
cin >> a >> b >> h;
cout << (a+b)*h/2 << endl;
return 0;
} | a.cc:2:16: error: expected identifier before ';' token
2 | using namespace;
| ^
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> a >> b >> h;
| ^~~
| std::cin
In file included from /usr/include... |
s732002896 | p03997 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i = 0;i < (n); ++i)
using namespace std;
int main(){
int a,b,h;
cin >> a >> b >> h;
cout << (a+b)*h/2
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:20: error: expected ';' before 'return'
11 | cout << (a+b)*h/2
| ^
| ;
......
14 | return 0;
| ~~~~~~
|
s645973778 | p03997 | Java | import java.util.*;
public class ABC045A{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
int b=sc.nextInt();
int h=sc.nextInt();
sc.close();
int s=(a+b)*h/2;
System.out.println(s);
}
} | Main.java:2: error: class ABC045A is public, should be declared in a file named ABC045A.java
public class ABC045A{
^
1 error
|
s171221779 | p03997 | Java | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
int b=sc.nextInt();
int c=sc.nextInt();
int trapezoid=(a+b)*h/2;
System.out.println(trapezoid);
}
} | Main.java:10: error: cannot find symbol
int trapezoid=(a+b)*h/2;
^
symbol: variable h
location: class Main
1 error
|
s029355157 | p03997 | C++ | #include<iostream>
using namespace std;
int a,b,h;
int main()
{
scanf("%d%d%d",&a,&b,&h)
cout<<(a+b)*h/2;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:29: error: expected ';' before 'cout'
6 | scanf("%d%d%d",&a,&b,&h)
| ^
| ;
7 | cout<<(a+b)*h/2;
| ~~~~
|
s474484384 | p03997 | C |
#include <stdio.h>
int main(){
int a,b,h;
csanf("%d",&a);
csanf("%d",&b);
csanf("%d",&h);
printf("%d\n",(a+b)*h/2);
return(0);
}
| main.c: In function 'main':
main.c:5:3: error: implicit declaration of function 'csanf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | csanf("%d",&a);
| ^~~~~
| scanf
|
s377067757 | p03997 | C | #include <stdio.h>
int main(){
int a,b,h;
csanf("%d",&a);
csanf("%d",&b);
csanf("%d",&h);
printf("%d\n",(a+b)*h/2);
return(0);
}
| main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'csanf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
4 | csanf("%d",&a);
| ^~~~~
| scanf
|
s853311120 | p03997 | C | #includ <stdio.h>
int main(){
int a,b,h;
csanf("%d",&a);
csanf("%d",&b);
csanf("%d",&h);
printf("%d\n",(a+b)*h/2);
return(0);
} | main.c:1:2: error: invalid preprocessing directive #includ; did you mean #include?
1 | #includ <stdio.h>
| ^~~~~~
| include
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'csanf' [-Wimplicit-function-declaration]
4 | csanf("%d",&a);
| ^~~~~
main.c:7:3: er... |
s603224768 | p03997 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main(void){
// Your code here!
int a, b, h;
cin >> a >> b >> h;
cout << (a+b) * h / 2
}
| a.cc: In function 'int main()':
a.cc:9:25: error: expected ';' before '}' token
9 | cout << (a+b) * h / 2
| ^
| ;
10 | }
| ~
|
s152905122 | p03997 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in); //台形の面積を求める
int a = sc.nextInt(); //上辺
int b = sc.nextInt(); //下辺
int h = sc.nextInt(); //高さ
int ans;
(a+b)*h/2=ans;
... | Main.java:11: error: unexpected type
(a+b)*h/2=ans;
^
required: variable
found: value
1 error
|
s161904418 | p03997 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in); //台形の面積を求める
int a = sc.nextInt(); //上辺
int b = sc.nextInt(); //下辺
int h = sc.nextInt(); //高さ
int ans;
(a+b)*h/2=ans;
... | Main.java:11: error: unexpected type
(a+b)*h/2=ans;
^
required: variable
found: value
1 error
|
s618690910 | p03997 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in); //台形の面積を求める
int a = sc.nextInt(); //上辺
int b = sc.nextInt(); //下辺
int h = sc.nextInt(); //高さ
int ans;
(a+b)*h/2 = ans;
... | Main.java:11: error: unexpected type
(a+b)*h/2 = ans;
^
required: variable
found: value
1 error
|
s750673644 | p03997 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in); //台形の面積を求める
int a = sc.nextInt(); //上辺
int b = sc.nextInt(); //下辺
int h = sc.nextInt(); //高さ
int ans;
(a + b)*h/2 = ans;
}
} | Main.java:11: error: unexpected type
(a + b)*h/2 = ans;
^
required: variable
found: value
1 error
|
s708252062 | p03997 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in); //台形の面積を求める
int a = sc.nextInt(); //上辺
int b = sc.nextInt(); //下辺
int h = sc.nextInt(); //高さ
int ans;
(a + b) * h / 2 = ans;
... | Main.java:11: error: unexpected type
(a + b) * h / 2 = ans;
^
required: variable
found: value
1 error
|
s340366186 | p03997 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in); //台形の面積を求める
int a = sc.nextInt(); //上辺
int b = sc.nextInt(); //下辺
int h = sc.nextInt(); //高さ
int ans;
(a + b) * h / 2 = ans;
... | Main.java:13: error: reached end of file while parsing
}
^
1 error
|
s783350964 | p03997 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a, b, h; cin >> a >> b >> h;
cout << (a + b) * (h\2) << endl;
} | a.cc:6:25: error: stray '\' in program
6 | cout << (a + b) * (h\2) << endl;
| ^
a.cc: In function 'int main()':
a.cc:6:25: error: expected ')' before numeric constant
6 | cout << (a + b) * (h\2) << endl;
| ~ ^~
| )
|
s973665050 | p03997 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
#define rep1(i,n) for (int i = 1; i <= (n); i++)
#define repi(i,a,b) for (int i = (a); i < (b); i++)
#define all(x) (x).begin(),(x).end()
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using vi... | a.cc: In function 'int main()':
a.cc:19:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
19 | cin << a << b << h;
| ~~~ ^~ ~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:19:7: note: candid... |
s874780777 | p03997 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin >>a>>b>>c;
cout << (a+b)*c/;2
}
| a.cc: In function 'int main()':
a.cc:6:19: error: expected primary-expression before ';' token
6 | cout << (a+b)*c/;2
| ^
a.cc:6:21: error: expected ';' before '}' token
6 | cout << (a+b)*c/;2
| ^
| ;
7 | }
| ~ ... |
s745035950 | p03997 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int a,b,h.area;
cin >> a >> b >> h;
area=((a+b)*h)/2;
cout << area <<endl;
} | a.cc: In function 'int main()':
a.cc:4:12: error: expected initializer before '.' token
4 | int a,b,h.area;
| ^
a.cc:5:20: error: 'h' was not declared in this scope
5 | cin >> a >> b >> h;
| ^
a.cc:6:3: error: 'area' was not declared in this scope
6 | area=((a... |
s253869948 | p03997 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#include<vector>
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >> c;
cout << (a+b)*h/2 << endl;
} | a.cc: In function 'int main()':
a.cc:9:19: error: 'h' was not declared in this scope
9 | cout << (a+b)*h/2 << endl;
| ^
|
s148332041 | p03997 | C++ | include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,h;
cin >> a >> b >> h;
cout << (a+b)*h/2 << endl;
} | 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:3: error: 'cin' was not declared in this scope
5 | cin >> a >> b >> h;
| ^~~
a.cc:6:3: error: 'cout' was not declared in this scope
6 | cout << (a+b)*h/2 << endl;
... |
s265644937 | p03997 | C++ | #include <iostream>
using namespace std;
int main(){
int a, b, h;
cin >> a >> b >> h;
cout << (a + b) * h / 2 << endl; | a.cc: In function 'int main()':
a.cc:6:41: error: expected '}' at end of input
6 | cout << (a + b) * h / 2 << endl;
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s845796072 | p03997 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Byte[] daikeihen = new Byte[3];
daikeihen[0] = sc.nextByte();
daikeihen[1] = sc.nextByte();
daikeihen[2] = sc.nextByte();
System.out.println((daikei... | Main.java:11: error: reached end of file while parsing
}
^
1 error
|
s289728944 | p03997 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
byte[] daikeihen = new byte[3];
for(int i = 0;i <= 2; i++){
daikeihen[i] = sc.nextInt();
}System.out.println((daikeihen[0] + daikeihen[1]) * daikeihen[2] / 2... | Main.java:8: error: incompatible types: possible lossy conversion from int to byte
daikeihen[i] = sc.nextInt();
^
1 error
|
s436182211 | p03997 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
byte[] daikeihen = new byte[3];
for(byte i = 0;i <= 2; i++){
daikeihen[i] = sc.nextInt();
}System.out.println((daikeihen[0] + daikeihen[1]) * daikeihen[2] / ... | Main.java:8: error: incompatible types: possible lossy conversion from int to byte
daikeihen[i] = sc.nextInt();
^
1 error
|
s536748779 | p03997 | C++ | #include<iostream>
using namespace std;
int main(){
int a, b, h;
cin >> a >> b >> h;
int ans = ((a+b) * h) /;
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:7:26: error: expected primary-expression before ';' token
7 | int ans = ((a+b) * h) /;
| ^
|
s133215532 | p03997 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,h,s;
cin >> a >> b >>c;
cout << ((a+b)*h)*0.5 << endl;
}
| a.cc: In function 'int main()':
a.cc:6:19: error: 'c' was not declared in this scope
6 | cin >> a >> b >>c;
| ^
|
s872994653 | p03997 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,h,s;
cin >> a,b,c;
cout << ((a+b)*h)*0.5 << endl;
}
| a.cc: In function 'int main()':
a.cc:6:14: error: 'c' was not declared in this scope
6 | cin >> a,b,c;
| ^
|
s774177976 | p03997 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,h,s;
cin >> a b c;
cout << ((a+b)*h)*0.5 << endl;
}
| a.cc: In function 'int main()':
a.cc:6:11: error: expected ';' before 'b'
6 | cin >> a b c;
| ^~
| ;
|
s188221398 | p03997 | C++ | #include<stdio.h>
int main(void)
{
int a,h,b,e;
1<a,b,c<100;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);
e=(a+b)*h/2;
printf("%d\n",e);
return 0;
} | a.cc: In function 'int main()':
a.cc:5:15: error: 'c' was not declared in this scope
5 | 1<a,b,c<100;
| ^
|
s870364542 | p03997 | C++ | #include<stdio.h>
int main(void)
{
int a,h,b,e;
1<a,b,c<100;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);
e=(a+b)*h/2;
printf("%d\n",s);
return 0;
} | a.cc: In function 'int main()':
a.cc:5:15: error: 'c' was not declared in this scope
5 | 1<a,b,c<100;
| ^
a.cc:10:23: error: 's' was not declared in this scope
10 | printf("%d\n",s);
| ^
|
s835123083 | p03997 | C++ | #include<stdio.h>
int main(void)
{
int a,h,b,e;
1<a,b,c<100;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);
e=(a+b)*h/2;
printf("%d\n",s);
return 0;
} | a.cc: In function 'int main()':
a.cc:5:15: error: 'c' was not declared in this scope
5 | 1<a,b,c<100;
| ^
a.cc:10:23: error: 's' was not declared in this scope
10 | printf("%d\n",s);
| ^
|
s198546748 | p03997 | C++ | #include<stdio.h>
int main(void)
{
int a,h,b,e;
1<a,b,c<100;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);
e=(a+d)*h/2;
printf("%d\n",s);
return 0;
} | a.cc: In function 'int main()':
a.cc:5:15: error: 'c' was not declared in this scope
5 | 1<a,b,c<100;
| ^
a.cc:9:14: error: 'd' was not declared in this scope
9 | e=(a+d)*h/2;
| ^
a.cc:10:23: error: 's' was not declared in this scope
10 | printf(... |
s106934709 | p03997 | C++ | #include<stdio.h>
int main(void)
{
int a,h,b,e;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);
e=(a+d)*h/2;
printf("%d\n",s);
return 0;
} | a.cc: In function 'int main()':
a.cc:8:14: error: 'd' was not declared in this scope
8 | e=(a+d)*h/2;
| ^
a.cc:9:23: error: 's' was not declared in this scope
9 | printf("%d\n",s);
| ^
|
s396690774 | p03997 | C++ | #include<stdio.h>
int main(void)
{
int a,h,b,e;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);
e=(a+d)*h;
printf("%d\n",s);
return 0;
} | a.cc: In function 'int main()':
a.cc:8:14: error: 'd' was not declared in this scope
8 | e=(a+d)*h;
| ^
a.cc:9:23: error: 's' was not declared in this scope
9 | printf("%d\n",s);
| ^
|
s251608778 | p03997 | C++ | #include<stdio.h>
int main(void)
{
int a,h,d,e;
scanf("%d",&a);
scanf("%d",&d);
scanf("%d",&h);
e=(a+d)*h;
printf("%d\n",s);
return 0;
} | a.cc: In function 'int main()':
a.cc:9:23: error: 's' was not declared in this scope
9 | printf("%d\n",s);
| ^
|
s758571406 | p03997 | C | #include<stdio.h>
int main(){
int a, b, h;
a = 4;
scanf("%d", &a);
b=5
scanf("%d", &b);
h=6
scanf("%d", &h);
printf("%d\n",(a+b)*h);
return 0;
} | main.c: In function 'main':
main.c:10:8: error: expected ';' before 'scanf'
10 | b=5
| ^
| ;
11 | scanf("%d", &b);
| ~~~~~
main.c:12:8: error: expected ';' before 'scanf'
12 | h=6
| ^
| ;
13 | scanf("%d", &h);
| ~~~~~
|
s501441905 | p03997 | C | #include<stdio.h>
int main(){
int a, b, h;
a = 4;
b = 5;
h = 6;
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &h);
printf("%d\n",(a+b)*h=));
return 0;
} | main.c: In function 'main':
main.c:16:27: error: expected expression before ')' token
16 | printf("%d\n",(a+b)*h=));
| ^
main.c:16:28: error: expected statement before ')' token
16 | printf("%d\n",(a+b)*h=));
| ^
|
s406470725 | p03997 | C | #include<stdio.h>
int main(){
int a, b, h;
a = 4;
b = 5;
h = 6;
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &h);
printf("%d\n",(a+b)*h=);
return 0;
} | main.c: In function 'main':
main.c:16:27: error: expected expression before ')' token
16 | printf("%d\n",(a+b)*h=);
| ^
|
s399862827 | p03997 | C | #include<stdio.h>
int main()
{
int a, b, h;
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &h);
printf("%dn", (a + b) * h / 2;
return 0;
}
| main.c: In function 'main':
main.c:9:34: error: expected ')' before ';' token
9 | printf("%dn", (a + b) * h / 2;
| ~ ^
| )
main.c:10:14: error: expected ';' before '}' token
10 | return 0;
| ^
| ... |
s877606110 | p03997 | C++ | #include<stdio.h>
int main()
{
int a, b, h;
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &h);
printf("%dn", (a + b) * h / 2;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:34: error: expected ')' before ';' token
9 | printf("%dn", (a + b) * h / 2;
| ~ ^
| )
|
s477871844 | p03997 | C | #include<stdio.h>
int main(){
printf("5\n");
printf("6\n");
printf("6\n");
return 0
} | main.c: In function 'main':
main.c:8:11: error: expected ';' before '}' token
8 | return 0
| ^
| ;
9 | }
| ~
|
s385134142 | p03997 | C++ | 3
4
2
| a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3
| ^
|
s424467189 | p03997 | C++ | #include <iostream>
using namespace std;
int main {
int a,b,c;
cin >> a >> b >> c;
cout << (a + b)*c << endl;
return 0;
} | a.cc:3:5: error: cannot declare '::main' to be a global variable
3 | int main {
| ^~~~
a.cc:4:5: error: expected primary-expression before 'int'
4 | int a,b,c;
| ^~~
a.cc:4:5: error: expected '}' before 'int'
a.cc:3:10: note: to match this '{'
3 | int main {
| ^
a.cc:5... |
s273256372 | p03997 | C++ | #include <iostream>
#include <stdio.h>
#include <algorithm>
using namespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
int sum = 0;
sum = ((a + b) * c)2;
cout << sum << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:13:24: error: expected ';' before numeric constant
13 | sum = ((a + b) * c)2;
| ^
| ;
|
s319364864 | p03997 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
int a,b,h;
cin>>a>>b>>h;
cout<<()(a+b)*h)/2<<endl;
}
| a.cc: In function 'int main()':
a.cc:8:10: error: expected primary-expression before ')' token
8 | cout<<()(a+b)*h)/2<<endl;
| ^
|
s417588751 | p03997 | C++ | #include<bits/stdc++>
using namespace std;
int main(void){
int a,b,h;
cin>>a>>b>>h;
cout<<()(a+b)*h)/2<<endl;
}
| a.cc:1:9: fatal error: bits/stdc++: No such file or directory
1 | #include<bits/stdc++>
| ^~~~~~~~~~~~~
compilation terminated.
|
s869965821 | p03997 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <string>
int main(int argc, char* argv[]) {
std::cin.tie(0);
std::ios::sync_with_stdio(false);
/* */
int a, b, h;
std::cin >> a >> b >> c;
std::cout << (a + b) * c / 2 << std::endl;
/* */
return E... | a.cc: In function 'int main(int, char**)':
a.cc:14:25: error: 'c' was not declared in this scope
14 | std::cin >> a >> b >> c;
| ^
|
s372214579 | p03997 | C++ | #include <iostream>
using namespace std;
int main()
{
int a, b, h;
cin >> a >> b >> h;
cout << (a + b) * h / 2 << endl;
return 0;
}
yatsu | a.cc:10:1: error: 'yatsu' does not name a type
10 | yatsu
| ^~~~~
|
s110782296 | p03997 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cstring>
#include <complex>
#include <stack>
#include <queue>
#include <unordered_map>
#include <map>
#define rep(i, a) for (int i = 0; i < (a); i++)
using namespace std;
using ll = long long int;
int main(){
cin >> a >> b >> h;... | a.cc: In function 'int main()':
a.cc:16:12: error: 'a' was not declared in this scope
16 | cin >> a >> b >> h;
| ^
a.cc:16:17: error: 'b' was not declared in this scope
16 | cin >> a >> b >> h;
| ^
a.cc:16:22: error: 'h' was not declared in this scope
16 | cin... |
s899001700 | p03997 | C++ | int main() {
int a, b, h;
cin >> a >> b >> h;
cout << (a + b) * h / 2 << endl;
} | a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
3 | cin >> a >> b >> h;
| ^~~
a.cc:4:3: error: 'cout' was not declared in this scope
4 | cout << (a + b) * h / 2 << endl;
| ^~~~
a.cc:4:30: error: 'endl' was not declared in this scope
4 | cout << (a ... |
s590587407 | p03997 | C++ | int main(){
int a, b, h;
cin >> a >> b >> h;
cout << (a + b) * h / 2 << endl; | a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
3 | cin >> a >> b >> h;
| ^~~
a.cc:4:3: error: 'cout' was not declared in this scope
4 | cout << (a + b) * h / 2 << endl;
| ^~~~
a.cc:4:30: error: 'endl' was not declared in this scope
4 | cout << (a ... |
s492283965 | p03997 | C | #include <stdio.h>
int main(void) {
int a;
int b;
int h;
int S;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);
S = ((a+b)*h)/2
printf("%d\n",S);
return 0;
} | main.c: In function 'main':
main.c:10:18: error: expected ';' before 'printf'
10 | S = ((a+b)*h)/2
| ^
| ;
11 | printf("%d\n",S);
| ~~~~~~
|
s953531664 | p03997 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
cout<<(a+b)*c/2
} | a.cc: In function 'int main()':
a.cc:6:18: error: expected ';' before '}' token
6 | cout<<(a+b)*c/2
| ^
| ;
7 | }
| ~
|
s837118136 | p03997 | C |
int a,b,h;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);
printf("%d",(a+b)*h/2);
| main.c:3:15: error: expected declaration specifiers or '...' before string constant
3 | scanf("%d",&a);
| ^~~~
main.c:3:20: error: expected declaration specifiers or '...' before '&' token
3 | scanf("%d",&a);
| ^
main.c:4:15: error: expected declarati... |
s440394088 | p03997 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,h;
cin >> a >> b >> h;
cout << (a+b)*h/2 << endl
} | a.cc: In function 'int main()':
a.cc:8:28: error: expected ';' before '}' token
8 | cout << (a+b)*h/2 << endl
| ^
| ;
9 | }
| ~
|
s964688499 | p03997 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,K,X,Y;
cin >> X >> Y >>Z;
int aaa;
aaa=(X+Y)*Z/2;
cout <<aaa << endl;
}
| a.cc: In function 'int main()':
a.cc:6:19: error: 'Z' was not declared in this scope
6 | cin >> X >> Y >>Z;
| ^
|
s957070927 | p03997 | C++ | #include<iostream>
int main(){
int A, B, C;
cin>>A>>B>>C;
cout<<(A + B) * C / 2 << endl;
return 0;
} | 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>>B>>C;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to... |
s150844442 | p03997 | C++ | #include <bits/stdc++.h>
using namespace std;
using VS = vector<string>; using LL = long long;
using VI = vector<int>; using VVI = vector<VI>;
using PII = pair<int, int>; using PLL = pair<LL, LL>;
using VL = vector<LL>; using VVL = vector<VL>;
#define ALL(a) begin((a)),end((a))
#define RALL(a) (a).... | a.cc: In function 'int main()':
a.cc:35:26: error: 'h' was not declared in this scope
35 | LL ans = (a + b)*h / 2;
| ^
|
s413004091 | p03997 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,h;
cin>>a>>b>>h;
cout<<(acb)*h/2<<endl;
}
| a.cc: In function 'int main()':
a.cc:7:10: error: 'acb' was not declared in this scope
7 | cout<<(acb)*h/2<<endl;
| ^~~
|
s101555194 | p03997 | C++ | #includea<bits/stdc++.h>
using namespace std;
int main(void){
int a,b,h;
cin>>a>>b>>h;
cout<<(a+b)*h/2<<endl;
return 0;
}
| a.cc:1:2: error: invalid preprocessing directive #includea; did you mean #include?
1 | #includea<bits/stdc++.h>
| ^~~~~~~~
| include
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
6 | cin>>a>>b>>h;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in ... |
s797614956 | p03997 | C++ | #includea<bits/stdc++.h>
using namespace std;
int main(void){
int a,b,h;
cin>>a>>b>>c;
cout<<(a+b)*h/2<<endl;
return 0;
}
| a.cc:1:2: error: invalid preprocessing directive #includea; did you mean #include?
1 | #includea<bits/stdc++.h>
| ^~~~~~~~
| include
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
6 | cin>>a>>b>>c;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in ... |
s553755402 | p03997 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n, m,o;
cin >> n >> m >> o;
cout << ( n + m ) * O / 2;
} | a.cc: In function 'int main()':
a.cc:7:23: error: 'O' was not declared in this scope
7 | cout << ( n + m ) * O / 2;
| ^
|
s191772388 | p03997 | C++ | #include <iostream>
using namespace std;
typedef long long unsigned int ll;
int main() {
int N、K,X,Y;
cin >> N;
cin >> K;
cin >> X;
cout << (N+K)*X/2<<endl;
return 0;
}
| a.cc:7:7: error: extended character 、 is not valid in an identifier
7 | int N、K,X,Y;
| ^
a.cc: In function 'int main()':
a.cc:8:10: error: 'N' was not declared in this scope
8 | cin >> N;
| ^
a.cc:9:10: error: 'K' was not declared in this scope
9 | cin >> K;
| ... |
s189405069 | p03997 | C | #include <iostream>
#include <queue>
using namespace std;
typedef long long ll;
#define repi(i, a, b) for(int i = int(a); i < int(b); ++i)
#define rep(i, n) repi(i, 0, n)
#define rerepi(i, a, b) for(int i = int(a)-1; i >= b; --i)
#define rerep(i, n) rerepi(i, n, 0)
template<class T> inline bool chmax(T& a, T b) { if ... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s625418988 | p03997 | C | #include "stdafx.h"
#include <iostream>
#include <queue>
using namespace std;
typedef long long ll;
#define repi(i, a, b) for(int i = int(a); i < int(b); ++i)
#define rep(i, n) repi(i, 0, n)
#define rerepi(i, a, b) for(int i = int(a)-1; i >= b; --i)
#define rerep(i, n) rerepi(i, n, 0)
template<class T> inline bool ch... | main.c:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s943895181 | p03997 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <cstdlib>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <stack>
#include <math.h>
#define rep(i, n) for(int i = 0; i < (n); ++i)
using namespace std;
template<class T> inline bool chmax(T& a, T b){ if(a < b) { a=b; return 1; }return ... | a.cc: In function 'int main()':
a.cc:35:33: error: 'c' was not declared in this scope
35 | int a,b,h; cin >> a >> b >> c;
| ^
|
s782557525 | p03997 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,h;
cin>>a>b>>h;
cout<<(a+b)*h/2<<endl;
} | a.cc: In function 'int main()':
a.cc:6:9: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
6 | cin>>a>b>>h;
| ~~~~~~^~~~~
| | |
| | int
| std::basic_istream<char>::__istream_type... |
s874664981 | p03997 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a, b, h;
cin >> a >> b >> c;
cout << (a + b) * c / 2 << endl;
} | a.cc: In function 'int main()':
a.cc:6:20: error: 'c' was not declared in this scope
6 | cin >> a >> b >> c;
| ^
|
s788218936 | p03997 | C++ | import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
System.out.println((a+b)*h/2);
}
}
| a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main{
| ^~~~~~
|
s117138341 | p03997 | C++ | #include<iostream>
#include<cmath>
#include<vector>
#include<set>
#include<algorithm>
#include<tuple>
#include<utility>
#include<cctype>
#include<climits>
#include<map>
#include<queue>
#include<functional>
#include <ios>
#include <iomanip>
using namespace std;
template<class T> void chmax(T& a, T b) {if(a < b){a=b;}}
... | a.cc: In function 'int atcoder()':
a.cc:37:12: error: 'n' was not declared in this scope
37 | cin >> n >> k;
| ^
a.cc:37:17: error: 'k' was not declared in this scope
37 | cin >> n >> k;
| ^
|
s726358318 | p03997 | C++ | #include<stream>
#include<stdio.h>
using namespace std;
int main(){
int a, b, h;
cin >> a >> b >> h;
cout << (a + b) * h / 2 << endl;
} | a.cc:1:9: fatal error: stream: No such file or directory
1 | #include<stream>
| ^~~~~~~~
compilation terminated.
|
s401800563 | p03997 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin >> a >> b >> c;
cout << (a+b)*h/2 << endl;
}
| a.cc: In function 'int main()':
a.cc:7:17: error: 'h' was not declared in this scope
7 | cout << (a+b)*h/2 << endl;
| ^
|
s233444830 | p03997 | C | main(a,b,c){scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*h/2);} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(a,b,c){scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*h/2);}
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:1:1:... |
s179859926 | p03997 | C | n = int(input())
h = list(map(int,input().split()))
res = 0
pre = 0
h.insert(0,0)
for i in range(n):
if h[i+1]>h[i]:
res += h[i+1]-h[i]
else:
print(res)
| main.c:1:1: warning: data definition has no type or storage class
1 | n = int(input())
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:5: error: expected expression before 'int'
1 | n = int(input())
| ^~~
|
s705760640 | p03997 | C++ | #include <iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
cout<<(a+b)*h/2<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:15: error: 'h' was not declared in this scope
7 | cout<<(a+b)*h/2<<endl;
| ^
|
s769353016 | p03997 | C++ | include <iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
cout<<(a+b)*h/2<<endl;
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin>>a>>b>>c;
| ^~~
a.cc:7:3: error: 'cout' was not declared in this scope
7 | cout<<(a+b)*h/2<<endl;
| ^~~~
a.... |
s447761336 | p03997 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a, b, h;
cin a >> b >> h;
cout << (a+b)*h/2 << endl;
}
| a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'a'
6 | cin a >> b >> h;
| ^~
| ;
|
s632089071 | p03997 | C++ | #include<iostream>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<string>
#include<vector>
using namespace std;
int main(void){
ios::sync_with_stdio(false); cin.tie(0);
int a,b,c;
cin>>a>>b>>c;
cout<<(a+b)*h/2<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:14:21: error: 'h' was not declared in this scope
14 | cout<<(a+b)*h/2<<endl;
| ^
|
s624718772 | p03997 | C | #include<stdio.h>
int main(){
int a,b,h;
scanf("%d\n%d\n%d",&a, &b, &c);
printf("%d\n",(a+b)*h/2);
return 0;
}
| main.c: In function 'main':
main.c:6:33: error: 'c' undeclared (first use in this function)
6 | scanf("%d\n%d\n%d",&a, &b, &c);
| ^
main.c:6:33: note: each undeclared identifier is reported only once for each function it appears in
|
s287102465 | p03997 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin >>a>>b;
cout<<(a+b)*h/2<<endl;
} | a.cc: In function 'int main()':
a.cc:6:15: error: 'h' was not declared in this scope
6 | cout<<(a+b)*h/2<<endl;
| ^
|
s098976518 | p03997 | C | main(a,b,c){scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*h/2);} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(a,b,c){scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*h/2);}
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:1:1:... |
s107533447 | p03997 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<iomanip>
#include<algorithm>
#include<queue>
#include<stack>
#include<map>
using namespace std;
#define ll long long
int main(){
int a,b,c,;
cin >> a >> b >> c;
cout << (a+b)*c/2;
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:15: error: expected unqualified-id before ';' token
12 | int a,b,c,;
| ^
|
s067840018 | p03997 | C++ | #include<iostream>
using namespace std;
int main(void)
{
int a,b,h;
cin << a << b << h;
cout >> (a + b) * h / 2;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
7 | cin << a << b << h;
| ~~~ ^~ ~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:7:7: note: candidat... |
s008130883 | p03997 | C++ | #include<iostream>
int main(void)
{
int a,b,h;
cin >> a >> b >> h;
cout << (a + b) * h / 2;
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> a >> b >> h;
| ^~~
| 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; ///< Lin... |
s802662916 | p03997 | C++ | #include<iostream>
int main(void)
{
int a,b,h;
cin << a << b << h;
cout >> (a + b) * h / 2;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin << a << b << h;
| ^~~
| 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; ///< Lin... |
s929950009 | p03997 | Java | import java.util.*;
public class Main{
public static void main(string[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
System.out.println((a+b)*h/2);
}
} | Main.java:3: error: cannot find symbol
public static void main(string[] args){
^
symbol: class string
location: class Main
1 error
|
s489340995 | p03997 | C | main(int a,int b,int h){
scanf("%d %d %d",&a,&b,&c);
printf("%d\n", (a + b) * h / 2);
} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(int a,int b,int h){
| ^~~~
main.c: In function 'main':
main.c:2:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
2 | scanf("%d %d %d",&a,&b,&c);
| ^~~~~
main.c:1:1: note: in... |
s649140381 | p03997 | C | main(a,b,h){
scanf("%d %d %d",&a,&b,&c);
printf("%d\n", (a + b) * h / 2);
} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(a,b,h){
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'h' defaults to 'int' [-Wimplicit... |
s805577620 | p03997 | C | #include <iostream>
using namespace std;
int main()
{
double a,b,h;
double s;
cin>>a>>b>>h;
s=(a+b)/2*h;
cout<<s;
return 0;
} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.