submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s718310463
p03997
C++
#include <iostream> using namespace std; int main(){ int a,b,h; cin >> a; cin >> b; cin >> c; cout << (a+b)h/2 << endl; }
a.cc: In function 'int main()': a.cc:9:10: error: 'c' was not declared in this scope 9 | cin >> c; | ^ a.cc:10:16: error: expected ';' before 'h' 10 | cout << (a+b)h/2 << endl; | ^ | ;
s332744142
p03997
C++
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout<<((a+b)+h)/2; return 0; }
a.cc: In function 'int main()': a.cc:6:16: error: 'h' was not declared in this scope 6 | cout<<((a+b)+h)/2; | ^
s071951188
p03997
C++
#include <iostream> using namespace std; int cal(int a,int b,int h){ int d ; d = (a + b)*h/2; return d; } int main(){ int a,b,h; cin >> a; cin >> b; cin >> h; cout << cal(a,b,h); return 0;
a.cc: In function 'int main()': a.cc:18:12: error: expected '}' at end of input 18 | return 0; | ^ a.cc:10:11: note: to match this '{' 10 | int main(){ | ^
s891985839
p03997
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,h; cin >> a >> b >> h; cout << (a+b)*h/2 }
a.cc: In function 'int main()': a.cc:7:20: error: expected ';' before '}' token 7 | cout << (a+b)*h/2 | ^ | ; 8 | 9 | } | ~
s019477455
p03997
Java
import java.util.*; // . > public class A{ public static void main(String args[]){ Scanner in = new Scanner(System.in); int a = in.nextInt(), b = in.nextInt(), c = in.nextInt(); System.out.println((a + b) * c / 2); } }
Main.java:3: error: class A is public, should be declared in a file named A.java public class A{ ^ 1 error
s863481137
p03997
Java
import java.util.*; // . > public class A{ public static void main(String args[]){ Scanner in = new Scanner(System.in); int a = in.nextInt(), b = in.nextInt(), c = in.nextInt(); System.out.println((a + b) * c / 2); } }
Main.java:3: error: class A is public, should be declared in a file named A.java public class A{ ^ 1 error
s691481025
p03997
C++
#include <bits/stdc++.h> using namespace std; int main(){ int A,B,H; cin >> A >> B >> H; cout << h*(A+B)/2 << endl; }
a.cc: In function 'int main()': a.cc:7:11: error: 'h' was not declared in this scope 7 | cout << h*(A+B)/2 << endl; | ^
s021136391
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:23: warning: extra tokens at end of #include directive 1 | #include<bits/stdc++>h> | ^ a.cc:1:9: fatal error: bits/stdc++>: No such file or directory 1 | #include<bits/stdc++>h> | ^~~~~~~~~~~~~~ compilation terminated.
s835466686
p03997
C
a,b,h=int(input.split()) print((a+b)*h/2)
main.c:1:1: warning: data definition has no type or storage class 1 | a,b,h=int(input.split()) | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] 1 | a,b,h=int(input.split()) | ^ main...
s060475449
p03997
C++
#include <bits/stdc++.h> #define rep(i,N) for (int i = 0; i < (N); ++i) #define all(v) v.begin(), v.end() using namespace std; using ll = long long; using P = pair<int, int>; int main(void){ int a, b, h; cin >> a >> b >> h; ans = (a + b) * h / 2; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:11:3: error: 'ans' was not declared in this scope; did you mean 'abs'? 11 | ans = (a + b) * h / 2; | ^~~ | abs
s672688974
p03997
C++
#include<iostream> #include<bits/stdc++.h> using namespace std; struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; //処理早くするためのおまじない int main(){ string Sa,Sb,Sc; cin>>Sa>>Sb>>Sc; string next; next.push_back(a[0]); while(true) { if(next=="a") { if(Sa.empty()) { cout<<"A"<<endl; break;...
a.cc: In function 'int main()': a.cc:12:16: error: 'a' was not declared in this scope; did you mean 'Sa'? 12 | next.push_back(a[0]); | ^ | Sa a.cc: At global scope: a.cc:53:8: error: redefinition of 'struct cww' 53 | struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0)...
s026903199
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:5:53: error: 'h' was not declared in this scope 5 | int a, b, c; cin >> a >> b >> c; cout << (a+b)*(h/2) << endl; | ^
s259702223
p03997
C++
#include <bits/stdc++.h> using namespace std; int main() { #include <bits/stdc++.h> using namespace std; int main() { int a, b, h; cin >> a >> b >> h; cout << b*h-(b-a)*h/2 << endl; }
a.cc: In function 'int main()': a.cc:8:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 8 | int main() { | ^~ a.cc:8:9: note: remove parentheses to default-initialize a variable 8 | int main() { | ^~ | -- a.cc:8:9: note: or rep...
s821967862
p03997
C++
#include <bits/stdc++.h> using namespace std; int main() { #include <bits/stdc++.h> using namespace std; int main() { int a, b, h; cin >> a >> b >> h; cout << b*h-(b-a)*h/2 << endl; } }
a.cc: In function 'int main()': a.cc:8:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 8 | int main() { | ^~ a.cc:8:9: note: remove parentheses to default-initialize a variable 8 | int main() { | ^~ | -- a.cc:8:9: note: or rep...
s844541084
p03997
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vll; typedef vector<vll> vvll; typedef pair<ll,ll> P; typedef string str; typedef vector<P> vp; typedef vector<string> vs; typedef vector<bool> vb; const ll mod=1e9+7; const ll inf=1e16; #define rep(i,m,n) for(ll i=m;i<n;i++) #...
a.cc: In function 'void solve()': a.cc:33:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'll' {aka 'long long int'}) 33 | cin >> (a+b)*h/2 << endl; | ~~~ ^~ ~~~~~~~~~ | | | | | ll {aka long long int} |...
s368720606
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; return }
a.cc: In function 'int main()': a.cc:13:2: error: expected primary-expression before '}' token 13 | } | ^ a.cc:12:9: error: expected ';' before '}' token 12 | return | ^ | ; 13 | } | ~
s774407303
p03997
C++
#include<iostream> using namespace std; int main() { int a,b,h,area; cin>>a>>b>>h; area=0.5*(a+b)*h; cout<<area<<endl; retrurn 0; }
a.cc: In function 'int main()': a.cc:9:3: error: 'retrurn' was not declared in this scope 9 | retrurn 0; | ^~~~~~~
s388465888
p03997
C++
#include<iostream> using namespace std; int a,b,h,sum;//KはくまでX円でNはくする int main(){ cin>>a>>b>>h; sum= (a+b)*h/2; cout<<sum<<endl; return o; }
a.cc: In function 'int main()': a.cc:11:16: error: 'o' was not declared in this scope 11 | return o; | ^
s070377327
p03997
C++
#incldue<bits/stdc++.h> using namespace std; int main(){ int a,b,h; cin>>a>>b>>h; cout<<(a+b)*h/2; return 0; }
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include? 1 | #incldue<bits/stdc++.h> | ^~~~~~~ | include 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:1:1: note: 'std::cin' is defined in header ...
s587921020
p03997
C
#include <stdio.h> int main(void){ int a, b, h; scanf("%d\n %d\n %d\n", &a, &b, &h); if (1<=a<=100 && 1<=b<=100 && 1<=h<=100){ printf("%d\n", (a+b)*h/2); }else { printf("%s\n", "Invalid!") } }
main.c: In function 'main': main.c:9:31: error: expected ';' before '}' token 9 | printf("%s\n", "Invalid!") | ^ | ; 10 | } | ~
s521232243
p03997
C++
#include<iostream> using namespace std; int main(){ int a,b ,v; cin >> a >> b >> c; cout << ((a+b)*v) / 2; }
a.cc: In function 'int main()': a.cc:5:18: error: 'c' was not declared in this scope 5 | cin >> a >> b >> c; | ^
s737901448
p03997
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int N=1e5+5,M=1e6+5,inf=0x3f3f3f3f,mod=1e9+7; #define mst(a) memset(a,0,sizeof a) #define lx x<<1 #define rx x<<1|1 #define reg register #define PII pair<int,int> #define fi first #define se second int main(){ int a,b,h; cin>>a>>b>>h; cout<<(...
a.cc: In function 'int main()': a.cc:15:24: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 15 | cout<<(a+b)*h/2<<end; | ~~~~~~~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/istream:41, from /...
s791901100
p03997
C++
#include<iostream> using namespace std; int main(){ int n,k,x,y; cin >> a >> b >>h; cout << (a+b)*h/2 <<endl; }
a.cc: In function 'int main()': a.cc:5:10: error: 'a' was not declared in this scope 5 | cin >> a >> b >>h; | ^ a.cc:5:15: error: 'b' was not declared in this scope 5 | cin >> a >> b >>h; | ^ a.cc:5:19: error: 'h' was not declared in this scope 5 | cin >> a >> b >>h;...
s228824548
p03997
C++
#include<iostream> using namespace std; int main() { float a,b int h; int area,area1; cin>>a; cin>>b; cin>>h; area1=(int)(a+b)/2; area=area1*h; cout<<area; return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: expected initializer before 'int' 6 | int h; | ^~~ a.cc:9:8: error: 'b' was not declared in this scope 9 | cin>>b; | ^ a.cc:10:8: error: 'h' was not declared in this scope 10 | cin>>h; | ^
s315614816
p03997
C
fasdfa
main.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input 1 | fasdfa | ^~~~~~
s149535106
p03997
C
include<stdio.h> int main(void) { int a; //上底 int b; //下底 int h; //高さ int ans; //答えを格納する変数 printf("a:"); scanf("%d",&a); printf("b:"); scanf("%d",&b); printf("h:"); scanf("%d",&h); ans=(a+b)*h/2; return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s770817603
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:7: error: expected initializer before '>>' token 6 | cin >> a >> b >> h; | ^~
s735751186
p03997
C
int a,b,h scanf("%d",&a); scanf("%d",&b); scanf("%d",&h); print("%d",(a+b)*h/2;
main.c:2:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf' 2 | scanf("%d",&a); | ^~~~~ main.c:3:7: error: expected declaration specifiers or '...' before string constant 3 | scanf("%d",&b); | ^~~~ main.c:3:12: error: expected declaration specifiers or '...' before '&' t...
s704337522
p03997
C
include <stdio.h> int main(void) { int a,b,h; printf("a:") scanf("%d",&a); printf("b:") scanf("%d",&b); printf("h:") scanf("%d",&h); printf("(a+b)*h/2"); return 0; }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s253507736
p03997
C
include<stdio.h> int main(void) { (a+b)*h/2
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s338051432
p03997
C++
#include bits/stdc++.h int main() { int a,b,h; int areah cin>>a; cin>>b; cin>>h; area=0.5*h*(b+a); cout<<area<<endl; return 0; }
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include bits/stdc++.h | ^~~~ a.cc: In function 'int main()': a.cc:6:3: error: expected initializer before 'cin' 6 | cin>>a; | ^~~ a.cc:7:3: error: 'cin' was not declared in this scope 7 | cin>>b; | ^~~ a.cc:9...
s909185343
p03997
C++
#include <iostream> using namespace std; int main(void){ int a,b,h,d; cin >> a >> b >> h; d = (a+b)*h/2 cout << d << endl; }
a.cc: In function 'int main()': a.cc:6:18: error: expected ';' before 'cout' 6 | d = (a+b)*h/2 | ^ | ; 7 | cout << d << endl; | ~~~~
s974485918
p03997
C++
#include <bits/dtsc++.h> using namespace std; int main(){ int a,b,h; cin >> a >> b >> h; cout << (a+b)*h/2 << endl; }
a.cc:1:10: fatal error: bits/dtsc++.h: No such file or directory 1 | #include <bits/dtsc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s726591930
p03997
C++
#include <iostream> using namespace std; int main(void){ // Your code here! int a, b, h; cin >> a >> b >> h; int ans = { ( a + b ) * h }/ 2; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:9:31: error: expected ',' or ';' before '/' token 9 | int ans = { ( a + b ) * h }/ 2; | ^
s846408642
p03997
C++
#include <iostream> using namespace std; int main(void){ // Your code here! int a, b, H; cin >> a >> b >> H; int n = a + b; int o = n * h; int ans = o / 2; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:11:17: error: 'h' was not declared in this scope 11 | int o = n * h; | ^
s039837949
p03997
C++
#include <iostream> using namespace std; int main(void){ // Your code here! int a, h, b; cin >> a >> h >> b; int ans a + b * h / 2; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:9:12: error: expected initializer before 'a' 9 | int ans a + b * h / 2; | ^ a.cc:11:12: error: 'ans' was not declared in this scope; did you mean 'abs'? 11 | cout << ans << endl; | ^~~ | abs
s646676060
p03997
C++
#include <iostream> using namespace std; int main(void){ // Your code here! int a, b, H; cin >> a >> b >> H; int ans = ((a + b) * h) / 2); cout << ans << endl; }
a.cc: In function 'int main()': a.cc:9:26: error: 'h' was not declared in this scope 9 | int ans = ((a + b) * h) / 2); | ^
s661741355
p03997
C++
#include <bits/stdc++.h> using namespace std; int main() { string a,b,h; cin >> a >> b >> h; cout << (a+b)*h/2 << endl; }
a.cc: In function 'int main()': a.cc:7:16: error: no match for 'operator*' (operand types are 'std::__cxx11::basic_string<char>' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 7 | cout << (a+b)*h/2 << endl; | ~~~~~^~ | | | | | basic_string<[...]...
s387340290
p03997
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, h; cin >> a >> b >> c; int ans = (a * b) * h / 2; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:6:20: error: 'c' was not declared in this scope 6 | cin >> a >> b >> c; | ^
s344025784
p03997
C++
a = int(input()) b = int(input()) h = int(input()) S = (a+b) * h / 2 print( int(S))
a.cc:1:1: error: 'a' does not name a type 1 | a = int(input()) | ^
s220618434
p03997
C++
#include <bits/stdc++.h> #define INF 2e9 #define MOD 1000000007 #define MOD9 998244353 #define intMAX 51000; #define PI 3.14159265359 using namespace std; typedef long long llong; // typedef long double ldouble; using Graph = vector<vector<int>>; // int ctoi(const char c){ // if('0' <= c && c <= '9') return (c-'0')...
a.cc: In function 'int main()': a.cc:37:19: error: 'h' was not declared in this scope 37 | cout << (a+b) * h / 2 << endl; | ^
s121073789
p03997
C++
#include <iostream> using namespace std; int main(void){ // Your code here! int a, b, h; cin >> a >> b >> h; int ans =( a + b ) * h; /2 cout << ans << endl; }
a.cc: In function 'int main()': a.cc:10:29: error: expected primary-expression before '/' token 10 | int ans =( a + b ) * h; /2 | ^
s877865507
p03997
C++
#include <iostream> using namespace std; int main() { int a, b, h, ret; cin >> a; cin >> b; cin >> h; ret = (a + b) * h / 2 return 0; }
a.cc: In function 'int main()': a.cc:9:24: error: expected ';' before 'return' 9 | ret = (a + b) * h / 2 | ^ | ; 10 | return 0; | ~~~~~~
s121622068
p03997
C++
#include<iostream> using namespace std; int main(){ int a; int b; int h; cin >> a >> b >>h; cout<<(a+b)*h/2;
a.cc: In function 'int main()': a.cc:8:19: error: expected '}' at end of input 8 | cout<<(a+b)*h/2; | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s036902074
p03997
Java
import java.util.Scanner; public class Main { static public void main(String[] args) { Scanner scan = new Scanner(System.in); int a; int b; int h; int s; a = scan.nextInt(); b = scan.nextInt(); h = scan.nextInt(); s = (a+b) / h; System.out.println(s); ...
Main.java:21: error: reached end of file while parsing } ^ 1 error
s744333629
p03997
Java
import java.util.Scanner; public class Main { static public void main(String[] args) { Scanner scan = new Scanner(System.in); int a; int b; int h; int s; a = scan.nextInt(); b = scan.nextInt(); h = scan.nextInt); s = (a+b) / h; System.out.println(s); ...
Main.java:15: error: ';' expected h = scan.nextInt); ^ Main.java:21: error: reached end of file while parsing } ^ 2 errors
s155685025
p03997
Java
import java.util.Scanner; public class Main { static public void main(String[] args) { Scanner scan = new Scanner(System.in); int a; int b; int h; int s; a = scan.nextLine(); b = scan.nextLine(); h = scan.nextLine(); s = (a+b) / h; System.out.println(s);...
Main.java:13: error: incompatible types: String cannot be converted to int a = scan.nextLine(); ^ Main.java:14: error: incompatible types: String cannot be converted to int b = scan.nextLine(); ^ Main.java:15: error: incompatible types: String cannot be converted to int...
s900985636
p03997
Java
import java.util.Scanner; public class Main { static public void main(String[] args) { Scanner scan = new Scanner(System.in); int a; int b; int h; int s; a = scan.nextLine(); b = scan.nextLine(); h = scan.nextLine(); s = (a+b) / h; System.out.println(s); ...
Main.java:21: error: reached end of file while parsing } ^ 1 error
s090749518
p03997
C++
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { /* code */ int a,b,h,answer; std::cin >> a >> b >> h; answer = (a+b)/2*h cout << answer << '\n'; return 0; }
a.cc: In function 'int main(int, const char**)': a.cc:9:21: error: expected ';' before 'cout' 9 | answer = (a+b)/2*h | ^ | ; 10 | cout << answer << '\n'; | ~~~~
s327610488
p03997
C++
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { /* code */ int a,b,h,answer; std::cin >> a >> b >> h; answer = (a+b)/2*h std::cout << answer << '\n'; return 0; }
a.cc: In function 'int main(int, const char**)': a.cc:9:21: error: expected ';' before 'std' 9 | answer = (a+b)/2*h | ^ | ; 10 | std::cout << answer << '\n'; | ~~~
s437932801
p03997
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(); // 整数の入力 int a = sc.nextInt(); int b = sc.nextInt(); int h = sc.nextInt(); //出力 System.out.println((a + b) * h / 2); } }
Main.java:4: error: no suitable constructor found for Scanner(no arguments) Scanner sc = new Scanner(); ^ constructor Scanner.Scanner(Readable,Pattern) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(Readable) is not applicable (...
s266856525
p03997
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a, b, h; cin >> a; cin >> b; cin >> c; cout << (a+b)*h/2 << endl; }
a.cc: In function 'int main()': a.cc:8:10: error: 'c' was not declared in this scope 8 | cin >> c; | ^
s049425069
p03997
C
#include<stdio.h> int main(void) { int a,b,h; printf("%d"(a + b) * h / 2); return 0;
main.c: In function 'main': main.c:7:10: error: called object is not a function or function pointer 7 | printf("%d"(a + b) * h / 2); | ^~~~ main.c:8:3: error: expected declaration or statement at end of input 8 | return 0; | ^~~~~~
s411847151
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:13:1: error: expected declaration before '}' token 13 | } | ^
s706193104
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:9:9: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 9 | cout >> ( a+b ) *h /2 >> endl; | ~~~~ ^~ ~~~~~~~~~~~~~ | | | | | int | std::ostream {a...
s445922985
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:9:9: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 9 | cout >> ( a+b )*h/2 >> endl; | ~~~~ ^~ ~~~~~~~~~~~ | | | | | int | std::ostream {aka std::...
s901525316
p03997
C++
//#include <tourist> #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> p; const int INF = 1e9; const ll LINF = ll(1e18); const int MOD = 1000000007; const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0}; const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, 1, 1, ...
a.cc: In function 'int main()': a.cc:55:17: error: 'h' was not declared in this scope 55 | cout<<(a+b)*h/2<<"\n"; | ^
s223858221
p03997
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, h; cin >> a >> b >> h; cout << (a+b)*h/2 }
a.cc: In function 'int main()': a.cc:7:20: error: expected ';' before '}' token 7 | cout << (a+b)*h/2 | ^ | ; 8 | } | ~
s805420342
p03997
C
#include <stdio.h> double Area(int a, int b, int h) { return ((a+ b) / 2) * h; } / int main() { int a=3 , b= 4, h=2; double area = Area(base1, base2, height); printf("Area is: %.%d", area); return 0; }
main.c:13:1: error: expected identifier or '(' before '/' token 13 | / | ^
s520042631
p03997
C
#include<stdio.h> double Area(int a, int b, int h) { return ((a+b) / 2) * h; } int main() { int a=3, b= 4, h = 6; double area = Area(a,b,h); cout << "Area is: " << area; return 0; }
main.c: In function 'main': main.c:15:5: error: 'cout' undeclared (first use in this function) 15 | cout << "Area is: " << area; | ^~~~ main.c:15:5: note: each undeclared identifier is reported only once for each function it appears in
s035539394
p03997
C
#include<stdio.h> int main() { int a,b,h,x,area; scanf('%d%d%d"&a,&b,&h); x=(a+b)/2; area=x*h; printf("%d",area); return 0; }
main.c: In function 'main': main.c:5:7: warning: missing terminating ' character 5 | scanf('%d%d%d"&a,&b,&h); | ^ main.c:5:7: error: missing terminating ' character 5 | scanf('%d%d%d"&a,&b,&h); | ^~~~~~~~~~~~~~~~~~ main.c:6:10: error: expected ')' before ';' token 6 | x=(a+b)/2; ...
s915386553
p03997
C
#include<stdio.h> int main() { int a,b,h,area; scanf("%d %d %d",&a,&b,&h); area= ((a+b)×h/2); Printf("area is=%d\n",area); return 0; }
main.c: In function 'main': main.c:6:16: error: stray '\303' in program 6 | area= ((a+b)<U+00D7>h/2); | ^~~~~~~~ main.c:6:16: error: expected ')' before 'h' 6 | area= ((a+b)×h/2); | ~ ^~ | ) main.c:7:4: error: implicit declaration of function 'P...
s800555594
p03997
C
#include<stdio.h> int main() { int a,b,c,d; scanf("%d%d%d",&a,&b,&c); d=((a+b)*h)/2; printf("%d",d); return 0; }
main.c: In function 'main': main.c:6:14: error: 'h' undeclared (first use in this function) 6 | d=((a+b)*h)/2; | ^ main.c:6:14: note: each undeclared identifier is reported only once for each function it appears in
s758909933
p03997
C++
#include <iostream> using namespace std; int main(){ int a,b,c; cin>>a; cin>>b; cin>>c; cout<<(a+b)*c/2 }
a.cc: In function 'int main()': a.cc:9:18: error: expected ';' before '}' token 9 | cout<<(a+b)*c/2 | ^ | ; 10 | } | ~
s194112139
p03997
C++
#include <iostream> using namespace std; int main() { int a, b, h; cin >> a; cin >> b; cin >> h; int ans; ans = (a + b) * h / 2; cout << ans << endl: return 0; }
a.cc: In function 'int main()': a.cc:12:24: error: expected ';' before ':' token 12 | cout << ans << endl: | ^ | ;
s679647251
p03997
Java
import java.io.*; public class Daikei { public static void main(String[] args) { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); try { int a = Integer.parseInt(reader.readLine()); int b = Integer.parseInt(reader.readLine()); int h = Integer.parseInt(reader.readLine()); Sy...
Main.java:3: error: class Daikei is public, should be declared in a file named Daikei.java public class Daikei { ^ 1 error
s167167444
p03997
Java
public class Main { public static void main(String[] args) { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); try { int a = Integer.parseInt(reader.readLine()); int b = Integer.parseInt(reader.readLine()); int h = Integer.parseInt(reader.readLine()); System.out.println((a +...
Main.java:3: error: cannot find symbol BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class BufferedReader location: class Main Main.java:3: error: cannot find symbol BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); ...
s009653994
p03997
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,j; cin >> a >> b >> h; cout << (a+b)*h/2 << endl; }
a.cc: In function 'int main()': a.cc:5:31: error: 'h' was not declared in this scope 5 | int a,b,j; cin >> a >> b >> h; | ^
s382876253
p03997
C++
#include <bits/stdc++.h> using namespace std; int main() { long a, b, c; cin >> a >> b >> c; cout << (a + b)*h / 2 << endl; }
a.cc: In function 'int main()': a.cc:10:25: error: 'h' was not declared in this scope 10 | cout << (a + b)*h / 2 << endl; | ^
s386611772
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:17: 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::...
s160584555
p03997
C++
#include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <algorithm> #include <bitset> #in...
a.cc: In function 'int main()': a.cc:64:20: error: 'hr' was not declared in this scope; did you mean 'h'? 64 | cin >> a >> b >> hr; | ^~ | h
s196966421
p03997
C++
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; int main() { int a,b,h; cin >> a >> b >> h; cout (a+b)*h/2; }
a.cc: In function 'int main()': a.cc:8:7: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)' 8 | cout (a+b)*h/2; | ~~~~~^~~~~
s382584880
p03997
C++
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; int main() { int a,b,h; cin >> a >> b >> h; cout (a+b)*h/2 }
a.cc: In function 'int main()': a.cc:8:7: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)' 8 | cout (a+b)*h/2 | ~~~~~^~~~~
s491979326
p03997
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, h; cin >> a >> b >> c; cout << (a + b) * h / 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; | ^
s465242565
p03997
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ios_base::sync_with_stdio(0); cin.tie(0), cout.tie(0); int a, b, h; cin >> a >> b >> h; cout << (a+b)*h)/2; return 0; }
a.cc: In function 'int main()': a.cc:12:20: error: expected ';' before ')' token 12 | cout << (a+b)*h)/2; | ^ | ;
s521776680
p03997
C++
include<bits/stdc++.h> using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(0); int a,b,h; cin>>a>>b>>h; int d= (a+b)*h; cout<<d/2; return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include<bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:4:5: error: 'cin' was not declared in this scope 4 | cin.tie(0); | ^~~ a.cc:5:5: error: 'ios' has not been declared 5 | ios::sync_with_stdio(0); | ^~~ a...
s218726239
p03997
C
#include<iostream> using namespace std; int main() { double a,b,h,area; cin>>a; cin>>b; cin>>h; area=((a+b)*h)/2.0; cout<<area<<"\n"; return 0; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s017861557
p03997
C++
#include<iostream> int main(){ int a,b,h; cin>>a>>b>>h; cout<<(a+b)*h/2<<endl; }
a.cc: In function 'int main()': a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | 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; ///< Linked to...
s082096480
p03997
C++
#include <bits/stdc++.h> using namespace std; //型に気を付けよう int main() { int a,b,h; const int p=2; cin>>a>>b>>h; cout<<((a+b)*h)/p }
a.cc: In function 'int main()': a.cc:9:20: error: expected ';' before '}' token 9 | cout<<((a+b)*h)/p | ^ | ; 10 | 11 | } | ~
s309645926
p03997
C++
3 4 2
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 | ^
s776603026
p03997
C++
4 4 4
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 4 | ^
s526914172
p03997
C++
#include<iostream> using namespace std; int tixing(int a,int b,int h) { int ans=(a+b)*h/2; return; } int main() { int a,b,h,ans; cin>>a>>b>>h; tixing(a,b,h); cout<<ans; return 0; }
a.cc: In function 'int tixing(int, int, int)': a.cc:6:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 6 | return; | ^~~~~~
s471829764
p03997
C++
#include<iostream> using namespace std; int tixing(int a,int b,int h) { int ans=(a+b)*h/2; cout<<ans; return; } int main() { int a,b,h,ans; cin>>a>>b>>h; tixing(a,b,h); return 0; }
a.cc: In function 'int tixing(int, int, int)': a.cc:7:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 7 | return; | ^~~~~~
s372702557
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:8:17: error: 'h' was not declared in this scope 8 | cout << (a+b)*h/2 << endl; | ^
s553406372
p03997
C++
int a; int b; int h; cin >> a >> b >> h; cout << (a + b) * h / 2 << endl;
a.cc:4:1: error: 'cin' does not name a type 4 | cin >> a >> b >> h; | ^~~ a.cc:6:1: error: 'cout' does not name a type 6 | cout << (a + b) * h / 2 << endl; | ^~~~
s091288034
p03997
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,h,area; area=(a+b)*h/2 cout<<area<<endl; }
a.cc: In function 'int main()': a.cc:6:21: error: expected ';' before 'cout' 6 | area=(a+b)*h/2 | ^ | ; 7 | cout<<area<<endl; | ~~~~
s088785903
p03997
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,h,area; area=(a+b)/2 *h cout<<area<<endl; }
a.cc: In function 'int main()': a.cc:6:18: error: expected ';' before 'cout' 6 | area=(a+b)/2 *h | ^ | ; 7 | cout<<area<<endl; | ~~~~
s312726940
p03997
C++
/*Function Template*/ #include<bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll,ll> pint; const int MAX = 510000; const int MOD = 1000000007; #define rep(i, n) for(ll i = 0; i < (n); i++) #define Rep(i, n) for(ll i = 1; i < (n); i++) #define ALL(a) (a).begin(),(a).end() #define IOS ios::sy...
a.cc: In function 'int main()': a.cc:177:16: error: 'n' was not declared in this scope 177 | vector<ll> v(n); | ^
s599915575
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:7:3: error: expected initializer before 'cin' 7 | cin a >> b >> h; | ^~~ a.cc:9:17: error: 'h' was not declared in this scope 9 | cout << (a+b)*h/2 << endl; | ^
s782272750
p03997
Java
var a=4; var b=4; var h=4; println((a+b)*h/2);
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. var a=4; ^ (use --enable-preview to enable unnamed classes) Main.java:4: error: class, interface, enum, or record expected println((a+b)*h/2); ^ 2 errors
s018533870
p03997
Java
int a=4; int b=4; int h=4; console.log((a+b)*h/2);
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. int a=4; ^ (use --enable-preview to enable unnamed classes) Main.java:4: error: class, interface, enum, or record expected console.log((a+b)*h/2); ^ 2 errors
s280123043
p03997
Java
int answer = (a+b)*h/2; console.log(answer);
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. int answer = (a+b)*h/2; ^ (use --enable-preview to enable unnamed classes) Main.java:2: error: class, interface, enum, or record expected console.log(answer); ^ 2 errors
s498591049
p03997
C++
import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import java.util.NoSuchElementException; import java.util.Random; import java.util.Scanner; class UnionFind{ int Parent[]; UnionFind(int n){//Initialize by -1 Parent=new int[n]; Arrays.fill(Parent, -1); } int root(int A) {//In whi...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.IOException; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.InputStream; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodu...
s113394021
p03997
C++
import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import java.util.NoSuchElementException; import java.util.Random; import java.util.Scanner; class UnionFind{ int Parent[]; UnionFind(int n){//Initialize by -1 Parent=new int[n]; Arrays.fill(Parent, -1); } int root(int A) {//In whi...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.IOException; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.InputStream; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodu...
s474229586
p03997
C++
#include <bits/stc.++h> using namespace std; int main() { int a,b,h; scanf("%d%d%d",&a,&b,&h); int ans=((a+b)*h)/2; printf("%d",ans); }
a.cc:1:10: fatal error: bits/stc.++h: No such file or directory 1 | #include <bits/stc.++h> | ^~~~~~~~~~~~~~ compilation terminated.
s303101931
p03997
C++
#include <bits/stc.++h> int main() { int a,b,h; scanf("%d%d%d",&a,&b,&h); int ans=((a+b)*h)/2; printf("%d",ans); }
a.cc:1:10: fatal error: bits/stc.++h: No such file or directory 1 | #include <bits/stc.++h> | ^~~~~~~~~~~~~~ compilation terminated.
s282835818
p03997
C
(a+b)*h/2
main.c:1:3: error: expected ')' before '+' token 1 | (a+b)*h/2 | ^ | )
s249099764
p03997
C++
#include <bits/stdc++.h> using namespace std; int main(void){ int a,b,h; cin >> a>>b>>h; cout << (a+b)*c/2; }
a.cc: In function 'int main()': a.cc:9:15: error: 'c' was not declared in this scope 9 | cout << (a+b)*c/2; | ^
s937313784
p03997
C++
#include <bits / stdc ++. h> using namespace std; struct cww {cww () {ios :: sync_with_stdio ( false ); cin.tie ( 0 );}} star; int main () { string A, B, C; cin >> A >> B >> C; string next; next.push_back (A [ 0 ]); int a {}, b {}, c {}; while ( true ) { if (nex...
a.cc:1:10: fatal error: bits / stdc ++. h: No such file or directory 1 | #include <bits / stdc ++. h> | ^~~~~~~~~~~~~~~~~~~ compilation terminated.
s737136164
p03997
C++
#include <bits/stdc++.h> using namespace std; int main(void) { int a,b,h; com>>a>>b>>h; cout<<(a+b)*h/2<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:20: error: 'com' was not declared in this scope; did you mean 'cos'? 7 | int a,b,h; com>>a>>b>>h; | ^~~ | cos