submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s180806295
p03997
C
#include,stdio.h> int main(void){ int a,b,h; scanf("%d %d %d",&a,&b,&h); printf("%d\n",(a+b)*h/2); return 0;
main.c:1:9: error: #include expects "FILENAME" or <FILENAME> 1 | #include,stdio.h> | ^ main.c: In function 'main': main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | scanf("%d %d %d",&a,&b,&h); | ^~~~~ main.c:1:1: note: include '<stdio.h>' o...
s013953230
p03997
C++
#include <iostream> void main() { int a,b,h; cin >> a >> b >> h; cout << (a+b) * h /2 << endl; }
a.cc:3:1: error: '::main' must return 'int' 3 | void main() { | ^~~~ 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 >> h; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: ...
s711787785
p03997
C++
#include <iostream> using namespace std; int main(voud) { int a, b, h, s; cin >> a >> b >> h; s = (a + b) * h / 2; cout << s << endl; }
a.cc:4:5: error: cannot declare '::main' to be a global variable 4 | int main(voud) | ^~~~ a.cc:4:10: error: 'voud' was not declared in this scope; did you mean 'void'? 4 | int main(voud) | ^~~~ | void
s774280334
p03997
C++
#include <iostream> #include <string> #include <utility> #include <algorithm> #include <map> #include <vector> #include <cmath> #include <cstdlib> #include <queue> #include <stack> using namespace std; #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i >= 0;i--) #define FOR(i, m, n) for(int...
a.cc: In function 'int main()': a.cc:27:34: error: 'Endl' was not declared in this scope 27 | cout << (a + b)*c / 2 << Endl; | ^~~~
s111054954
p03997
C++
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 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.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:6:15: error: expected ':' before 'static' 6 | public static void main(String[] args) { | ^~~~~~~ | : ...
s793276834
p03997
C++
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 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.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:6:15: error: expected ':' before 'static' 6 | public static void main(String[] args) { | ^~~~~~~ | : ...
s129158388
p03997
C++
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <cmath> #include <map> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> plglg; typedef pair<double, ll> pdlg; typedef tuple<int, int, int> tiii; typedef tuple<ll, ll, ll> tlglglg; typedef tup...
a.cc:15:23: error: expected initializer before 'pow' 15 | static const int giga pow(10,9); | ^~~
s084450761
p03997
C++
#include <iostream> int main(){ int a,b,h; cin >> a >> b >> h; cout << (a+b)*2 / 2; <<endl; return 0; }
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 a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; //...
s335494351
p03997
C++
#include <bits/stdc++.h> #define FOR(i, n) for(int i = 0;i <n;i++) #define RFOR(i, n) for(int i = n;i >= 0;i--) #define REP(i, m, n) for(int i = m;i < n;i++) #define RREP(i, m, n) for(int i = m;i >= n;i--) #define INF 999999999 using namespace std; int main(int argc, char const *argv[]) { int a,b,h; cin >>a>>b>>h; ...
a.cc: In function 'int main(int, const char**)': a.cc:13:4: error: lvalue required as left operand of assignment 13 | h / 2= (a+b)/h; | ~~^~~
s810416192
p03997
C++
#include <iostream> 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; | ^
s242631792
p03997
C++
#include <iostream> #include <vector> #include <string> #include <map> #include <set> #include <stack> #include <queue> #include <cmath> #include <algorithm> #include <utility> #include <functional> using namespace std; typedef long long ll; typedef pair<ll, ll> P; const int MOD = 1000000007; const double EPS = 1e-9; ...
a.cc:44:11: error: redefinition of 'const int MOD' 44 | const int MOD = 1000000007; | ^~~ a.cc:15:11: note: 'const int MOD' previously defined here 15 | const int MOD = 1000000007; | ^~~ a.cc:45:14: error: redefinition of 'const double EPS' 45 | const double EPS = 1e-9; | ...
s318810626
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:7:29: error: expected '}' at end of input 7 | cout << (a+b)*h/2 << endl; | ^ a.cc:4:15: note: to match this '{' 4 | int main(void){ | ^
s920550699
p03997
C++
a,b,h=map(int,input().split()) print( (a+b)*h/2 )
a.cc:1:1: error: 'a' does not name a type 1 | a,b,h=map(int,input().split()) | ^
s918209677
p03997
C
#include <iostream> using namespace std; int main() { double x, y, h, area; cin >> x >> y >> h; area = (x+y)*h/2; cout << area; return 0; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s893274956
p03997
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, h; cin >> a >> b >> h; cout << (a + b) * h / 2 << nedl; }
a.cc: In function 'int main()': a.cc:8:30: error: 'nedl' was not declared in this scope 8 | cout << (a + b) * h / 2 << nedl; | ^~~~
s937505711
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:7:32: error: expected ';' before '}' token 7 | cout << a * b * h / 2 << endl | ^ | ; 8 | } | ~
s918447508
p03997
C++
#include<bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << ((a + b)*c) / 2 << endl; }
a.cc:4:17: error: extended character   is not valid in an identifier 4 | int a, b, c; | ^ a.cc: In function 'int main()': a.cc:4:17: error: 'int\U00003000a' was not declared in this scope 4 | int a, b, c; | ^~~~~~ a.cc:4:25: error: 'b' ...
s808692972
p03997
C++
#include<bits/stdc++.h> using namespace std; int main() { inta, b, c; cin >> a >> b >> c; cout << ((a + b)*c) / 2 << endl; }
a.cc: In function 'int main()': a.cc:4:17: error: 'inta' was not declared in this scope; did you mean 'int'? 4 | inta, b, c; | ^~~~ | int a.cc:4:23: error: 'b' was not declared in this scope 4 | inta, b, c; | ...
s881170853
p03997
C++
#include <iostream> using namespace std; int main(void) { int a,b,c; cin >> a >> b >> h; cout << (a+b) * h /2 << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:26: error: 'h' was not declared in this scope 6 | cin >> a >> b >> h; | ^
s759551206
p03997
C++
#include <iostream> using namespace std; int main(void) { int a,b,c; cin >> a >> b >> h; cout << (a+b) * h /2 << endl;a return 0; }
a.cc: In function 'int main()': a.cc:6:26: error: 'h' was not declared in this scope 6 | cin >> a >> b >> h; | ^ a.cc:7:39: error: expected ';' before 'return' 7 | cout << (a+b) * h /2 << endl;a | ^ | ...
s530367189
p03997
C++
#include <iostream> #include <cstdlib> #include <vector> #include <algorithm> #include <cstring> using namespace std; int main(int argc, char *argv[]) { int a, b, c; cin >> a >> b >> c; cout << ((a + b) * h) / 2 << endl; return 0; }
a.cc: In function 'int main(int, char**)': a.cc:13:28: error: 'h' was not declared in this scope 13 | cout << ((a + b) * h) / 2 << endl; | ^
s259474608
p03997
C++
include <iostream> #include <cstdio> #include <algorithm> using namespace std; int a, b, h, area; int main() { cin >> a; cin >> b; cin >> h; area = (a + b)*h / 2; cout << area << endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from a.cc:3: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __...
s671748048
p03997
C++
#include<iostream> using namespace std; int man(){ int a,b,h; cin>>a>>b>>h; cout<<(a+b)*h/2<<endl; return 0; }
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s746254316
p03997
C++
#include <cstdio> int main() { int a =0,b =0,h =0; double s =0; scanf ("%d",&a); scanf ("%d",&b); scanf ("%d",&c); s =(a+b)*h/2; printf ("%f",s); return 0; }
a.cc: In function 'int main()': a.cc:8:22: error: 'c' was not declared in this scope 8 | scanf ("%d",&c); | ^
s442956875
p03997
C++
#include <cstdio> int main() { int a =0,b =0,h =0,s =0; scanf ("%d\n",&a); scanf ("%d\n",&b); scanf ("%d\n",&c); s =(a+b)*h/2; printf ("%d\n",s); return 0; }
a.cc: In function 'int main()': a.cc:7:24: error: 'c' was not declared in this scope 7 | scanf ("%d\n",&c); | ^
s798982829
p03997
C++
#include <cstdio> int main() { int a =0,b =0,h =0,s =0; scanf ("%d",&a); scanf ("%d",&b); scanf ("%d",&c); s =(a+b)*h/2; printf ("%d",s); return 0; }
a.cc: In function 'int main()': a.cc:7:22: error: 'c' was not declared in this scope 7 | scanf ("%d",&c); | ^
s216330758
p03997
C++
#include <cstdio> int main() { int a = 0,b = 0,h = 0,s = 0; s=(a+b)*h/2 scanf ("%d",&a); scanf ("%d",&b); scanf ("%d",&h); printf ("%d\n",s) ; return 0; }
a.cc: In function 'int main()': a.cc:5:12: error: expected ';' before 'scanf' 5 | s=(a+b)*h/2 | ^ | ; 6 | 7 | scanf ("%d",&a); | ~~~~~
s675927614
p03997
C++
#include <cstdio> int main() { int a = 0,b = 0,h = 0,s = 0; s=(a+b)*h/2 scanf ("%d",a); scanf ("%d",b); scanf ("%d",h); printf ("%d\n",s) ; return 0; }
a.cc: In function 'int main()': a.cc:5:12: error: expected ';' before 'scanf' 5 | s=(a+b)*h/2 | ^ | ; 6 | 7 | scanf ("%d",a); | ~~~~~
s771554424
p03997
C
#include<stdio.h> int main() { int a,b,h,s=0; //1<=a<=100,1<=b<=100,1<=h<=100 scanf("%d%d%d,&a&b&h); //h为偶数 s=(a+b)*h*1/2; printf("%d",s); return 0; }
main.c: In function 'main': main.c:6:7: warning: missing terminating " character 6 | scanf("%d%d%d,&a&b&h); | ^ main.c:6:7: error: missing terminating " character 6 | scanf("%d%d%d,&a&b&h); | ^~~~~~~~~~~~~~~~ main.c:8:14: error: expected ')' before ';' token 8 | s=(a+b)*h*1/2; ...
s832154181
p03997
C++
include<stdio.h> int main(void){ int a,b,h; scanf("%d",&a); scanf("%d",&b); scanf("%d",&h); printf("%d\n",(a+b)*h/2); return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include<stdio.h> | ^~~~~~~
s100424448
p03997
C
#include<stdio.h> int main () { int a,b,h; float s; scanf(“%d%d%d”, &a, &b, &h); s= (a+b) *h/2; printf (“%f”,s); return 0; }
main.c: In function 'main': main.c:6:14: error: stray '\342' in program 6 | scanf(<U+201C>%d%d%d<U+201D>, &a, &b, &h); | ^~~~~~~~ main.c:6:15: error: expected expression before '%' token 6 | scanf(“%d%d%d”, &a, &b, &h); | ^ main.c:6:21: error: stray '\342' ...
s616205094
p03997
C
#include<stdio.h> Int main () { Int a,b,h; float s; scanf(“%d%d%d”,&a,&b,&c); s=(a+b)*h/2; printf(“%f”,s); return 0; }
main.c:2:1: error: unknown type name 'Int'; did you mean 'int'? 2 | Int main () | ^~~ | int main.c: In function 'main': main.c:4:8: error: unknown type name 'Int'; did you mean 'int'? 4 | Int a,b,h; | ^~~ | int main.c:6:8: error: expected '=', ',', ';', 'asm' or '__a...
s737995476
p03997
Java
#include <bits/stdc++.h> #include <vector> using namespace std; int a,b,c; int main(){ cin>>a>>b>>c; cout<< (a+b)*c/2<<endl; return 0; }
Main.java:1: error: illegal character: '#' #include <bits/stdc++.h> ^ Main.java:1: error: class, interface, enum, or record expected #include <bits/stdc++.h> ^ Main.java:2: error: illegal character: '#' #include <vector> ^ Main.java:4: error: class, interface, enum, or record expected int a,b,c; ^ Main.java:6:...
s159566138
p03997
C
#include<stdio.h> int main () { int a,b,h; float s; scanf(“%d%d%d”,&a,&b,&c); s=(a+b)*h/2; printf(“%f”,s); return0; }
main.c: In function 'main': main.c:6:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf' 6 | scanf(“%d%d%d”,&a,&b,&c); | ^~~~~ main.c:6:14: error: stray '\342' in program 6 | scanf(<U+201C>%d%d%d<U+201D><U+FF0C>&a<U+FF0C>&b<U+FF0C>&c<U+FF09><U+FF1B> | ...
s516388948
p03997
C
#include<stdio.h> int main () { int a,b,h; float s; scanf(“%d%d%d”,&a,&b,&c); s=(a+b)*h/2; printf(“%f”,s); return 0; }
main.c: In function 'main': main.c:6:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf' 6 | scanf(“%d%d%d”,&a,&b,&c); | ^~~~~ main.c:6:14: error: stray '\342' in program 6 | scanf(<U+201C>%d%d%d<U+201D><U+FF0C>&a<U+FF0C>&b<U+FF0C>&c<U+FF09><U+FF1B> | ...
s208616431
p03997
C
#include<stdio.h> Int main () { Int a,b,h; float s; scanf(“%d%d%d”,&a,&b,&c); s=(a+b)*h/2; printf(“%f”,s); return0; }
main.c:2:1: error: unknown type name 'Int'; did you mean 'int'? 2 | Int main () | ^~~ | int main.c: In function 'main': main.c:4:8: error: unknown type name 'Int'; did you mean 'int'? 4 | Int a,b,h; | ^~~ | int main.c:6:8: error: expected '=', ',', ';', 'asm' or '__a...
s623442223
p03997
C
#include<stdio.h> Int main () { Int a,b,h; float s; scanf(“%d%d%d”,&a,&b,&c); s=(a+b)*h/2; printf(“%f”,s); return 0; }
main.c:2:1: error: unknown type name 'Int'; did you mean 'int'? 2 | Int main () | ^~~ | int main.c: In function 'main': main.c:4:8: error: unknown type name 'Int'; did you mean 'int'? 4 | Int a,b,h; | ^~~ | int main.c:6:8: error: expected '=', ',', ';', 'asm' or '__a...
s478520735
p03997
C
#include<stdio.h> int main () { int a,b,h; float s; scanf(“%d%d%d”, &a, &b, &h) ; s= (a+b) *h/2; printf (“%f”,s) ; return0; }
main.c: In function 'main': main.c:6:14: error: stray '\342' in program 6 | scanf(<U+201C>%d%d%d<U+201D>, &a, &b, &h) ; | ^~~~~~~~ main.c:6:15: error: expected expression before '%' token 6 | scanf(“%d%d%d”, &a, &b, &h) ; | ^ main.c:6:21: error: stray '\3...
s506671867
p03997
C
#include<stdio.h> int main () { Int a,b,h; float s; scanf(“%d%d%d”,&a,&b,&c); s=(a+b)*h/2; printf(“%f”,s); return 0; }
main.c: In function 'main': main.c:4:8: error: unknown type name 'Int'; did you mean 'int'? 4 | Int a,b,h; | ^~~ | int main.c:6:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf' 6 | scanf(“%d%d%d”,&a,&b,&c); | ^~~~~ main.c:6:14: error:...
s978892272
p03997
C
#include<stdio.h> Int main () { int a,b,h; float s; scanf(“%d%d%d”,&a,&b,&c); s=(a+b)*h/2; printf(“%f”,s); return 0; }
main.c:2:1: error: unknown type name 'Int'; did you mean 'int'? 2 | Int main () | ^~~ | int main.c: In function 'main': main.c:6:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf' 6 | scanf(“%d%d%d”,&a,&b,&c); | ^~~~~ main.c:6:14: error: stray '\342' in pro...
s316830737
p03997
C
#include<stdio.h> int main () { int a,b,h; float s; scanf(“%d%d%d”, &a, &b, &h); s= (a+b) *h/2; printf (“%f”,s); return0; }
main.c: In function 'main': main.c:6:14: error: stray '\342' in program 6 | scanf(<U+201C>%d%d%d<U+201D>, &a, &b, &h); | ^~~~~~~~ main.c:6:15: error: expected expression before '%' token 6 | scanf(“%d%d%d”, &a, &b, &h); | ^ main.c:6:21: error: stray '\342' ...
s991766365
p03997
C
#include<stdio.h> int main () { int a,b,h; float s; scanf(“%d%d%d”, &a, &b, &h); s= (a+b) *h/2; printf (“%f”,s); return 0; }
main.c: In function 'main': main.c:6:14: error: stray '\342' in program 6 | scanf(<U+201C>%d%d%d<U+201D>, &a, &b, &h); | ^~~~~~~~ main.c:6:15: error: expected expression before '%' token 6 | scanf(“%d%d%d”, &a, &b, &h); | ^ main.c:6:21: error: stray '\342' ...
s616074741
p03997
C
#include<stdio.h> int main () { int a,b,h; float s; scanf(“%d%d%d”, &a, &b, &h); s=(a+b) *h/2; printf(“%f”,s); return 0; }
main.c: In function 'main': main.c:6:14: error: stray '\342' in program 6 | scanf(<U+201C>%d%d%d<U+201D>, &a, &b, &h); | ^~~~~~~~ main.c:6:15: error: expected expression before '%' token 6 | scanf(“%d%d%d”, &a, &b, &h); | ^ main.c:6:21: error: stray '\342' ...
s377242077
p03997
C++
{ #include <stdio.h> int main() { float d1,d2,h; scanf("%f%f%f",&d1,&d2,&h); //输入上底、下底以及高 printf("%f",(d1+d2)/2*h); //输出面积 return 0; }
a.cc:1:1: error: expected unqualified-id before '{' token 1 | { | ^
s479967482
p03997
C++
#include <stdio.h> #include <stdlib.h> int main() { int a, b, h,c; scanf_s("%d%d%d", &a, &b, &h); c = (a + b)*h/2; printf("%d\n",c); system("pause"); }
a.cc: In function 'int main()': a.cc:6:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 6 | scanf_s("%d%d%d", &a, &b, &h); | ^~~~~~~ | scanf
s661766050
p03997
C++
#include<iostream> using namespace std; int main() { int a,b,h; cin>>b>>h>>a cout<<''s=''<<(a+b)*h/2.0<<endl; return 0; }
a.cc:7:7: error: empty character constant 7 | cout<<''s=''<<(a+b)*h/2.0<<endl; | ^~~ a.cc:7:11: error: empty character constant 7 | cout<<''s=''<<(a+b)*h/2.0<<endl; | ^~ a.cc: In function 'int main()': a.cc:6:6: error: 'b' was not declared in this scope 6 | cin>>b>>h>>a | ...
s541076627
p03997
C
#include <stdio.h> int main() { float a,b,c; float s; printf("a,b,h”); scanf("%f %f %f",&a,&b,&c); s=((a+b)*c)/2; printf("%f",s); }
main.c: In function 'main': main.c:6:8: warning: missing terminating " character 6 | printf("a,b,h”); | ^ main.c:6:8: error: missing terminating " character 6 | printf("a,b,h”); | ^~~~~~~~~ main.c:7:27: error: expected ')' before ';' token 7 | scanf("%f %f %f",&a,&b,&c); | ...
s961083500
p03997
C++
#include int main(void) { int a,b,h,c; printf("a,b,h:"); scanf("%d%d%d",&a,&b,&h); c=a*b; printf("the length=%d,the width=%d,the height=h\nThe area=%d\n",a,b,h); return 0; }
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include | ^ a.cc: In function 'int main()': a.cc:5:1: error: 'printf' was not declared in this scope 5 | printf("a,b,h:"); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '...
s695158292
p03997
C++
#include<iostream> using namespace std; int main() { int a,b,h; cin>>b>>a>>h; cout<<''s=''<<(a+b)*h/2.0<<endl; return 0; }
a.cc:7:7: error: empty character constant 7 | cout<<''s=''<<(a+b)*h/2.0<<endl; | ^~~ a.cc:7:11: error: empty character constant 7 | cout<<''s=''<<(a+b)*h/2.0<<endl; | ^~ a.cc: In function 'int main()': a.cc:6:6: error: 'b' was not declared in this scope 6 | cin>>b>>a>>h; | ...
s880438782
p03997
C++
#include<iostream> using namespace std; int main() { int a,b,h; cin>>a>>b>>h; cout<<''s=''<<(a+b)*h/2.0<<endl; return 0; }
a.cc:7:7: error: empty character constant 7 | cout<<''s=''<<(a+b)*h/2.0<<endl; | ^~~ a.cc:7:11: error: empty character constant 7 | cout<<''s=''<<(a+b)*h/2.0<<endl; | ^~ a.cc: In function 'int main()': a.cc:6:6: error: 'a' was not declared in this scope 6 | cin>>a>>b>>h; | ...
s100554287
p03997
C++
#include<iostream> using namespace std; int main() { int a,b,h; cin>>a>>b>>h; cout<<''s=''<<(a+b)*h/2.0<<endl; return 0; }
a.cc:7:7: error: empty character constant 7 | cout<<''s=''<<(a+b)*h/2.0<<endl; | ^~~ a.cc:7:11: error: empty character constant 7 | cout<<''s=''<<(a+b)*h/2.0<<endl; | ^~ a.cc: In function 'int main()': a.cc:6:6: error: 'a' was not declared in this scope 6 | cin>>a>>b>>h; | ...
s424993897
p03997
C++
#include int main(void) { int a,b,h,c; printf("a,b,h"); scanf("%d%d%d",&a,&b,&h); c=a*b; printf("the length=%d,the width=%d,the height=h\nThe area=%d\n",a,b,h); return 0; }
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include | ^ a.cc: In function 'int main()': a.cc:5:1: error: 'printf' was not declared in this scope 5 | printf("a,b,h"); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#...
s077246295
p03997
C++
#include<iostream> using namespace std; int main() { int a,b,h; cin>>a>>b,h; cout<<''s=''<<(a+b)*h/2.0<<endl; return 0; }
a.cc:7:7: error: empty character constant 7 | cout<<''s=''<<(a+b)*h/2.0<<endl; | ^~~ a.cc:7:11: error: empty character constant 7 | cout<<''s=''<<(a+b)*h/2.0<<endl; | ^~ a.cc: In function 'int main()': a.cc:6:6: error: 'a' was not declared in this scope 6 | cin>>a>>b,h; | ...
s836495566
p03997
C++
#include<iostream> using namespace std; int main() { int a,b,h; cin>>a,b,h; cout<<''s=''<<(a+b)*h/2.0<<endl; return 0; }
a.cc:7:7: error: empty character constant 7 | cout<<''s=''<<(a+b)*h/2.0<<endl; | ^~~ a.cc:7:11: error: empty character constant 7 | cout<<''s=''<<(a+b)*h/2.0<<endl; | ^~ a.cc: In function 'int main()': a.cc:6:6: error: 'a' was not declared in this scope 6 | cin>>a,b,h; | ...
s311496372
p03997
C++
#include<iostream> using namespace std; int main() { int a,b,h; cin>>a,b,h; cout<<s=<<(a+b)*h/2.0<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:6: error: 'a' was not declared in this scope 6 | cin>>a,b,h; | ^ a.cc:6:8: error: 'b' was not declared in this scope 6 | cin>>a,b,h; | ^ a.cc:6:10: error: 'h' was not declared in this scope 6 | cin>>a,b,h; | ^ a.cc:7:7: error: 's'...
s685003399
p03997
C++
#include<iostream> using namespace std; int main() { int a,b,h; cin>>a,b,h; cout<<''s=''<<(a+b)*h/2.0<<endl; return 0; }
a.cc:7:7: error: empty character constant 7 | cout<<''s=''<<(a+b)*h/2.0<<endl; | ^~~ a.cc:7:11: error: empty character constant 7 | cout<<''s=''<<(a+b)*h/2.0<<endl; | ^~ a.cc: In function 'int main()': a.cc:6:6: error: 'a' was not declared in this scope 6 | cin>>a,b,h; | ...
s031879398
p03997
C++
#include<iostream> using namespace std; int main() { int a,b,h; cin>>a,b,h; cout<<''s=''<<(a+b)*h/2.0<<endl; return 0; }
a.cc:7:7: error: empty character constant 7 | cout<<''s=''<<(a+b)*h/2.0<<endl; | ^~~ a.cc:7:11: error: empty character constant 7 | cout<<''s=''<<(a+b)*h/2.0<<endl; | ^~ a.cc: In function 'int main()': a.cc:6:6: error: 'a' was not declared in this scope 6 | cin>>a,b,h; | ...
s794186359
p03997
C++
#include<iostream> using namespace std; int main() { int a,b,h; cin>>a,b,h; cout<<''s=''<<(a+b)*h/2.0<<endl; return 0; }
a.cc:7:7: error: empty character constant 7 | cout<<''s=''<<(a+b)*h/2.0<<endl; | ^~~ a.cc:7:11: error: empty character constant 7 | cout<<''s=''<<(a+b)*h/2.0<<endl; | ^~ a.cc: In function 'int main()': a.cc:6:6: error: 'a' was not declared in this scope 6 | cin>>a,b,h; | ...
s641016330
p03997
C
#include <stdio.h> int main(){int a,b,c;scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*c/2)}
main.c: In function 'main': main.c:2:69: error: expected ';' before '}' token 2 | int main(){int a,b,c;scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*c/2)} | ^ | ;
s728137332
p03997
C
#include <stdio.h> int main(void) { int a,b,h; scnaf("%d%d%d",&a,&b,&h); printf("%d",(a+b)*h/2); return 0; }
main.c: In function 'main': main.c:7:1: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration] 7 | scnaf("%d%d%d",&a,&b,&h); | ^~~~~ | scanf
s001560375
p03997
C++
#include <iostream> #include <string> #include <string.h> using namespace std; int main() { int a,b,c,d,e,f; cin >> a >> b >> c; d = a+b; cout << d*c/2 << endl; return 0; } #include <iostream> #include <string> #include <string.h> using namespace std; int main() { int a,b,c,...
a.cc:21:5: error: redefinition of 'int main()' 21 | int main() { | ^~~~ a.cc:5:5: note: 'int main()' previously defined here 5 | int main() { | ^~~~
s327998732
p03997
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, s, d,; cin >> a >> s >> d ; cout << (a+s)*d/2<< endl; }
a.cc: In function 'int main()': a.cc:6:15: error: expected unqualified-id before ';' token 6 | int a, s, d,; | ^
s439534006
p03997
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, s, d,; cin >> a >> s >> d ; cout << (a+s)*d/2<< endl; }
a.cc: In function 'int main()': a.cc:6:15: error: expected unqualified-id before ';' token 6 | int a, s, d,; | ^
s529508614
p03997
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, s, d,; cin >> a >> s >> d ; cout << (a+s)*h/2<< endl; }
a.cc: In function 'int main()': a.cc:6:15: error: expected unqualified-id before ';' token 6 | int a, s, d,; | ^ a.cc:9:17: error: 'h' was not declared in this scope 9 | cout << (a+s)*h/2<< endl; | ^
s270733919
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:5:29: error: expected '}' at end of input 5 | cout << (a+b)*h/2 << endl; | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s414993292
p03997
C++
#include <stdio.h> int main(void) { int a,b,h; int s; scanf("%d", &a); scanf("%d", &b); scanf("%d", &h); s =(a + b)*h/2; printf("s = %d\n", s); return 0; } ~
a.cc:19:2: error: expected class-name at end of input 19 | ~ | ^
s854428171
p03997
C++
#include <stdio.h> int main(void) { int a,b,h; int s; printf("a="); scanf("%d", &a); printf("b="); scanf("%d", &b); printf("h="); scanf("%d", &h); s =(a + b)*h/2; printf("s = %d\n", s); return 0; } ~
a.cc:19:2: error: expected class-name at end of input 19 | ~ | ^
s244727536
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; }
a.cc: In function 'int main()': a.cc:5:8: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 5 | cin<<a<<b<<h; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:5:8: note: candidate:...
s399914885
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:9: error: reached end of file while parsing } ^ 1 error
s649077189
p03997
C++
#include <bits/stdc++.h> using namespace std; double a, b, h; int main(){ cin>>a>>b>>c; cout<<(a+b)*h/2<<endl; }
a.cc: In function 'int main()': a.cc:6:14: error: 'c' was not declared in this scope 6 | cin>>a>>b>>c; | ^
s611012788
p03997
C++
#include <bits/stdc++.h> using namespace std; int a, b, h; int main(){ cin>>a>>b>>c; cout<<(a+b-1)*h/2+1<<endl; }
a.cc: In function 'int main()': a.cc:6:14: error: 'c' was not declared in this scope 6 | cin>>a>>b>>c; | ^
s660406355
p03997
C++
#include <cstdio> using std::cin; using std::cout; using std::endl; using namespace std; int main() { int a, b, h; cin >> a >> b >> h; cout << (a + b) * 2 / 2 << endl; }
a.cc:3:12: error: 'cin' has not been declared in 'std' 3 | using std::cin; | ^~~ a.cc:4:12: error: 'cout' has not been declared in 'std' 4 | using std::cout; | ^~~~ a.cc:5:12: error: 'endl' has not been declared in 'std' 5 | using std::endl; | ^~~~ a.cc: In...
s867967339
p03997
Java
import java.util.*; public class Main { public static void main(String[] args) { // 自分の得意な言語で // Let's チャレンジ!! Scanner sc = new Scanner(System.in); String line = sc.nextLine(); int a=integer.parseInt(line); line = sc.nextLine(); int b=integer.parseInt(line); line = sc.nextLine(); ...
Main.java:11: error: cannot find symbol int a=integer.parseInt(line); ^ symbol: variable integer location: class Main Main.java:13: error: cannot find symbol int b=integer.parseInt(line); ^ symbol: variable integer location: class Main Main.java:15: error: cannot find symbol int h=integer.parseI...
s471851162
p03997
C++
#include <bits/stdc++.h> #include <typeinfo> #include <cxxabi.h> #ifdef LOCAL #include "dbgtoki.hpp" #define DUMP(i) dump((string)TOSTRING(i), demangle(typeid(i).name()), __LINE__ , i) DbgTimer D_t; #define TSTART() D_t.start() #define TSTOP() D_t.stop() #else #define DUMP(i) #define TSTART() #define TS...
a.cc: In function 'int main()': a.cc:36:26: error: 'h' was not declared in this scope 36 | while(cin >> a >> b >> h){ | ^
s774992852
p03997
C++
#include<iostream> using namespace std; int main(void) { int a, b, c; cin >> a >> b >> c; cout << (a+b)*h/(double)(2) << endl; }
a.cc: In function 'int main()': a.cc:8:17: error: 'h' was not declared in this scope 8 | cout << (a+b)*h/(double)(2) << endl; | ^
s144322123
p03997
C++
#include<iostream> using namespace std; int main(void) { int a, b, c; cin >> a >> b >> c; cout << (a+b)*h/double(2) << endl; }
a.cc: In function 'int main()': a.cc:8:17: error: 'h' was not declared in this scope 8 | cout << (a+b)*h/double(2) << endl; | ^
s239440229
p03997
C++
a = int(input()) b = int(input()) h = int(input()) print(int((a+b)*h/2))
a.cc:1:1: error: 'a' does not name a type 1 | a = int(input()) | ^
s265925819
p03997
C++
a=int(input()) b=int(input()) h=int(input()) print((a+b)*h//2) #inputはstrに対応 #勝手に改行
a.cc:6:2: error: invalid preprocessing directive #input\U0000306fstr\U0000306b\U00005bfe\U00005fdc 6 | #inputはstrに対応 | ^~~~~~~~~~~~~~~~ a.cc:7:2: error: invalid preprocessing directive #\U000052dd\U0000624b\U0000306b\U00006539\U0000884c 7 | #勝手に改行 | ^~~~~~~~~~ a.cc:2:1: error: 'a' does not name a ...
s841110796
p03997
C++
a = int(input()) b = int(input()) h = int(input()) print((a + b) * h // 2)
a.cc:1:1: error: 'a' does not name a type 1 | a = int(input()) | ^
s219408368
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; }
a.cc: In function 'int main()': a.cc:5:18: error: expected initializer before 'h' 5 | int a, b h; | ^ a.cc:6:21: error: 'b' was not declared in this scope 6 | cin >> a >> b >> h; | ^ a.cc:6:26: error: 'h' was not declared in this scope 6 | ...
s348210849
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; }
a.cc: In function 'int main()': a.cc:5:21: error: expected unqualified-id before ';' token 5 | int a, b ,h,; | ^
s946018870
p03997
C++
#include s/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout<<(a+b)/2*c<<endl; }
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include s/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope 5 | cin>>a>>b>>c; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable b...
s219781718
p03997
C++
#include <iostream> #include <map> using namespace std; typedef long long ll; int main(){ ll i,j,k; ll a,b,c; ll h,w,n; cin>>h>>w>>n; map<pair<int,int>,int> cnt; for(i=0;i<n;i++){ cin>>a>>b; for(j=-1;j<=1;j++){ for(k=-1;k<=1;k++){ if(a+j>=1 && a+j<=h && b+k>=1 && b+j<=w){ cnt[make_pair(a+j,b+...
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s627021589
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:7:20: error: expected ';' before 'return' 7 | cout << (a+b)*h/2 | ^ | ; 8 | 9 | return 0; | ~~~~~~
s299294838
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:13: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 6 | cin << a << b << h; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<...
s596402347
p03997
C++
process.stdin.resume(); process.stdin.setEncoding('ascii'); var input_stdin = ""; var input_stdin_array = ""; var input_currentline = 0; process.stdin.on('data', function (data) { input_stdin += data; }); process.on('SIGINT', function(){ input_stdin_array = input_stdin.split("\n"); main(); process.ex...
a.cc:2:27: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 2 | process.stdin.setEncoding('ascii'); | ^~~~~~~ a.cc:8:18: warning: multi-character character constant [-Wmultichar] 8 | process.stdin.on('data', function (data) { | ...
s658039917
p03997
C++
#include <stdio.h> int main(){ scanf("%d %d %d",&a,&b,&c); d=((a+b)*h)/2; printf("%d",d); return 0 }
a.cc: In function 'int main()': a.cc:3:27: error: 'a' was not declared in this scope 3 | scanf("%d %d %d",&a,&b,&c); | ^ a.cc:3:30: error: 'b' was not declared in this scope 3 | scanf("%d %d %d",&a,&b,&c); | ^ a.cc:3:33: error: '...
s139940974
p03997
C
#include<stdio.h> int main(){ int a,b,h; scanf("%d%d%d",&a,&b,&c); printf("%d",(a+b)*h/2); return 0; }
main.c: In function 'main': main.c:4:25: error: 'c' undeclared (first use in this function) 4 | scanf("%d%d%d",&a,&b,&c); | ^ main.c:4:25: note: each undeclared identifier is reported only once for each function it appears in
s707123278
p03997
C++
#include<iostream> #include<math.h> #include<string> #include<algorithm> using namespace std; #define rep0(n) for(int i=0;i<n;i++) #define rep(n) for(int i=1;i<=n;i++) double const pi=3.1415926535; int printint(int n){ cout<<n<<endl; return 0; } int prints(string s){ cout<<s<<endl; return 0; } int cinint(strin...
a.cc: In function 'int cinint(std::string)': a.cc:23:13: error: declaration of 'int s' shadows a parameter 23 | int s; | ^ a.cc:22:19: note: 'std::string s' previously declared here 22 | int cinint(string s){ | ~~~~~~~^ a.cc:25:16: error: 'n' was not declared in this sco...
s687410109
p03997
C++
#include<iostream> #include<math.h> #include<string> #include<algorithm> using namespace std; #define rep0(n) for(int i=0;i<n;i++) #define rep(n) for(int i=1;i<=n;i++) int const pi=3.1415926535; int printint(int n){ cout<<n<<endl; return 0; } int prints(string s){ cout<<s<<endl; return 0; } int cinint(int n){ ...
a.cc: In function 'int cinint(int)': a.cc:23:13: error: declaration of 'int n' shadows a parameter 23 | int n; | ^ a.cc:22:16: note: 'int n' previously declared here 22 | int cinint(int n){ | ~~~~^ a.cc: In function 'int main()': a.cc:30:23: error: 'a' was not declared i...
s872852128
p03997
C++
#include<bits/stdc++.h> using namespace std; int main() { cin >> a >> b >> h; cout << (a+b)*h/2 << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:12: error: 'a' was not declared in this scope 5 | cin >> a >> b >> h; | ^ a.cc:5:17: error: 'b' was not declared in this scope 5 | cin >> a >> b >> h; | ^ a.cc:5:22: error: 'h' was not declared in this scope 5 | cin >>...
s147948564
p03997
C++
#include <bits/stdc++.h> //#include <math.h> using namespace std; #define INF 1.1e9 #define LINF 1.1e18 #define FOR(i,a,b) for (int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define ALL(v) (v).begin(),(v).end() #define pb push_back #define pf push_front #define fi first #define se second #define BIT(x,n) bitset<n>(...
a.cc: In function 'int main()': a.cc:34:17: error: 'h' was not declared in this scope 34 | cout<<a*h/2+b*h/2<<endl; | ^
s841749386
p03997
C++
#include<iostream> using namespace std; int main(){ int a,b,h; cin >> a >> b >> h; int ans = (a+b)*h/2 cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:5: error: expected ',' or ';' before 'cout' 9 | cout << ans << endl; | ^~~~
s928750982
p03997
C++
using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; class hawawa { static Printer sw = new Printer(Console.OpenStandardOutput()) { AutoFlush = false }; static void Main() { Console.SetOut(sw); so...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.G...
s633061280
p03997
C++
#include <iostream> #include <string> #include <algorithm> 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:8:25: error: 'h' was not declared in this scope 8 | cout << (a + b)*h / 2 << endl; | ^
s430298519
p03997
Java
public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); int h = scanner.nextInt(); System.out.print((a + b) * h / 2); } }
Main.java:4: error: cannot find symbol Scanner scanner = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner scanner = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 ...
s152407337
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(); int c =2; System.out.println((a+b)h/2); } }
Main.java:9: error: ')' or ',' expected System.out.println((a+b)h/2); ^ Main.java:9: error: not a statement System.out.println((a+b)h/2); ^ Main.java:9: error: ';' expected System.out.println((a+b)h/2); ^ 3 errors
s497041337
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(); int c = 2; 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:2:1: error: expected unqualified-id before 'public' 2 | public class Main { | ^~~~~~
s029832846
p03997
C++
#include<iostream> using namespace std; main int(){ int a,b,c; cin>>a>>b>>c; cout<<(a+b)*c/2<<endl; }
a.cc:3:1: error: 'main' does not name a type 3 | main int(){ | ^~~~
s545004379
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; return 0; }
a.cc: In function 'int main()': a.cc:6:23: error: 'h' was not declared in this scope 6 | cout << (a+b)*h/2 << endl; | ^