submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s433917961 | p03997 | C++ | #include<iostream>
using namespace std;
int main(){
int a,h,b;
cin>>a>>h>>b;
cout<<(a+b)*h/w<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:23: error: 'w' was not declared in this scope
6 | cout<<(a+b)*h/w<<endl;
| ^
|
s352455756 | 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:24: error: expected ';' before 'return'
6 | cout<<(a+b)*h/2
| ^
| ;
7 | return 0;
| ~~~~~~
|
s938172276 | p03997 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int h = scan.nextInt();
scan.close();
system.out.println(((a + b) * h)/2);
}
} | Main.java:12: error: package system does not exist
system.out.println(((a + b) * h)/2);
^
1 error
|
s960563606 | p03997 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int h = scan.nextInt();
scan.close();
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:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s028295302 | p03997 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
a = s.nextInt();
b = s.nextInt();
h = s.nextInt();
System.out.println((a + b) * h / 2);
}
} | Main.java:5: error: cannot find symbol
a = s.nextInt();
^
symbol: variable a
location: class Main
Main.java:6: error: cannot find symbol
b = s.nextInt();
^
symbol: variable b
location: class Main
Main.java:7: error: cannot find symbol
h = s.nextInt();
^
symbol: variable h
location: class M... |
s074012659 | p03997 | C++ | a = int(input())
b = int(input())
c = int(input())
print(int((a+b)*c/2)) | a.cc:1:1: error: 'a' does not name a type
1 | a = int(input())
| ^
|
s661202809 | p03997 | C++ | 3
4
2 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3
| ^
|
s962393617 | p03997 | C++ | signed main(void){
int a,b,h;
cin >> a >> b >> h;
cout << (a+b)*h/2 << "\r\n";
} | a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
4 | cin >> a >> b >> h;
| ^~~
a.cc:5:3: error: 'cout' was not declared in this scope
5 | cout << (a+b)*h/2 << "\r\n";
| ^~~~
|
s414458589 | p03997 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <queue>
#include <stack>
#include <map>
#include <vector>
#include <cstdio>
#include <cmath>
#include <cctype>
#define INF 1000000000
using namespace std;
bool debug=false;
int mian(){
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
|
s843785614 | 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:8: error: expected unqualified-id before '=' token
6 | int = a,b,h;
| ^
a.cc:7:11: error: 'a' was not declared in this scope
7 | cin >> a >> b >> h;
| ^
a.cc:7:16: error: 'b' was not declared in this scope
7 | cin >> a >> b >> h;
... |
s150441994 | p03997 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <cmath>
#include <utility>
using namespace std;
#define fol(i,n) for (int i=0;i<n;i++)
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:14:15: error: 'h' was not declared in this scope
14 | cout << (a+b)*h/2<<endl;
| ^
|
s110645034 | 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())
| ^
|
s154823353 | p03997 | C++ | package main
import (
"fmt"
)
func main(){
var a,b,h int
fmt.Scan(&a, &b, &h)
fmt.Println((a + b) * h / 2)
} | a.cc:1:1: error: 'package' does not name a type
1 | package main
| ^~~~~~~
|
s532167411 | p03997 | C | #include<stdio.h>
int main(){
int a,b,c;
scanf("%d %d %d".&a.&b.&c);
printf("%d\n",(a+b)*c/2);
return 0;
} | main.c: In function 'main':
main.c:4:18: error: expected identifier before '&' token
4 | scanf("%d %d %d".&a.&b.&c);
| ^
|
s364496381 | p03997 | C++ | #include <stdio.h>
main()
{
int a,b,h;
scanf("%d %d %d",&a,&b,&h);
printf("%d",(a+b)*c/2);
} | a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main()
| ^~~~
a.cc: In function 'int main()':
a.cc:6:23: error: 'c' was not declared in this scope
6 | printf("%d",(a+b)*c/2);
| ^
|
s869215540 | p03997 | Java |
public class Main {
public static void main(String[] args) {
// write your code here
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int h = scan.nextInt();
System.out.println(String.valueOf((a+b)*h/2));
}
}
| Main.java:6: error: cannot find symbol
Scanner scan = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:6: error: cannot find symbol
Scanner scan = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s533610905 | p03997 | C | include <stdio.h>
int main(){
int a, b, c;
scanf("%d %d", &a, &b);
printf("%d\n", c/2*(a+b));
return 0;
} | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s902502624 | p03997 | Java | 4
4
4 | Main.java:1: error: class, interface, enum, or record expected
4
^
1 error
|
s972259203 | 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:8: error: ')' or ',' expected
System.out.println((a+b)h/2);
^
Main.java:8: error: not a statement
System.out.println((a+b)h/2);
^
Main.java:8: error: ';' expected
System.out.println((a+b)h/2);
^
3 errors
|
s863562301 | p03997 | Java | package spring;
import java.io.*;
public class abc045a {
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
int a, b, h, ans = 0;
while((a = System.in.read()) != -1);
while((b = System.in.read()) != -1);
while((h = System.in.read()) != -1);
ans = ((a + b) *... | Main.java:3: error: class abc045a is public, should be declared in a file named abc045a.java
public class abc045a {
^
1 error
|
s017101600 | p03997 | Java | package spring;
import java.io.*;
public class abc045a {
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
int a, b, h, ans = 0;
while((a = System.in.read()) != -1);
while((b = System.in.read()) != -1);
while((h = System.in.read()) != -1);
ans = ((a + b) *... | Main.java:3: error: class abc045a is public, should be declared in a file named abc045a.java
public class abc045a {
^
1 error
|
s917813421 | p03997 | Java | package spring;
import java.io.*;
public class abc045_a {
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
int a, b, h, ans = 0;
while((a = System.in.read()) != -1);
while((b = System.in.read()) != -1);
while((h = System.in.read()) != -1);
ans = ((a + b) ... | Main.java:3: error: class abc045_a is public, should be declared in a file named abc045_a.java
public class abc045_a {
^
1 error
|
s886708856 | p03997 | Java | package spring;
import java.io.*;
public class abc045_a {
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
int a, b, h, ans = 0;
while((a = System.in.read()) != -1);
while((b = System.in.read()) != -1);
while((h = System.in.read()) != -1);
ans = ((a + b) ... | Main.java:3: error: class abc045_a is public, should be declared in a file named abc045_a.java
public class abc045_a {
^
1 error
|
s039287904 | p03997 | C++ | a, b, h=gets.split.map &:to_i
puts (a+b)*h/2 | a.cc:1:1: error: 'a' does not name a type
1 | a, b, h=gets.split.map &:to_i
| ^
|
s713577706 | p03997 | C | #include <cstdio>
using namespace std;
#define sci(x) int x; scanf("%d", &x);
#define scii(x, y) int x, y; scanf("%d%d", &x, &y);
int main() {
scii(a,b)sci(h)
printf("%d\n",(a+b)*h/2);
} | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s005747528 | p03997 | C++ | #include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#include<map>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vec... | a.cc: In function 'int main()':
a.cc:33:15: error: expected unqualified-id before ';' token
33 | int a,b,c,; cin>>a>>b>>c;
| ^
|
s771418124 | p03997 | Java | Scanner sc = new Scanner(System.in);
int a = Integer.parseInt(sc.nextLine());
int b = Integer.parseInt(sc.nextLine());
int h = Integer.parseInt(sc.nextLine());
System.out.println(String.valueOf((a+b)*h/2));
| Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
Scanner sc = new Scanner(System.in);
^
(use --enable-preview to enable unnamed classes)
Main.java:6: error: class, interface, enum, or record expected
System.out.println(String.valueOf((a+b)*h/2));
^
2 errors
|
s510686513 | 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
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:24: error: expected ';' before 'return'
7 | cout<<(a+b)*(c/2)<<endl
| ^
| ;
8 | return 0;
| ~~~~~~
|
s918200473 | p03997 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(i=0; i<n; i++)
int main(){
int a,b,h;
cout>>(a+b)*h/2;
} | a.cc: In function 'int main()':
a.cc:7:7: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
7 | cout>>(a+b)*h/2;
| ~~~~^~~~~~~~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:7:7... |
s150904671 | p03997 | Java | a=int(input())
b=int(input())
c=int(input())
print(int((a+b)*c/2)) | Main.java:1: error: class, interface, enum, or record expected
a=int(input())
^
1 error
|
s848135495 | p03997 | C | #include <stdio.h>
int main()
{
int i;
char moji[3][101];
int cnt[3];
for(i = 0; i < 3; i++){
scanf("%s", moji[i]);
cnt[i] = 0;
}
int pos = 0;
char c;
while (1){
c = moji[pos][cnt[pos]];
if (c == 'a'){
cat[pos]++;
pos = 0;
}else if(c == 'b'){
cat[pos]++;
pos = 1;
}else if(c == 'c'){
cat[pos]++;
pos = 2;
}else if(... | main.c: In function 'main':
main.c:19:1: error: 'cat' undeclared (first use in this function); did you mean 'cnt'?
19 | cat[pos]++;
| ^~~
| cnt
main.c:19:1: note: each undeclared identifier is reported only once for each function it appears in
|
s306540134 | p03997 | C | #include <stdio.h>
int main()
{
int i;
char moji[3][101];
int cnt[3];
for(i = 0; i < 3; i++){
scanf("%s", moji[i]);
cnt[i] = 0;
}
int pos = 0;
char c;
while (1){
c = getchar(moji[pos][cnt[pos]]);
if (c == 'a'){
cat[pos]++;
pos = 0;
}else if(c == 'b'){
cat[pos]++;
pos = 1;
}else if(c == 'c'){
cat[pos]++;
pos = 2;
... | main.c: In function 'main':
main.c:17:5: error: too many arguments to function 'getchar'
17 | c = getchar(moji[pos][cnt[pos]]);
| ^~~~~~~
In file included from main.c:1:
/usr/include/stdio.h:582:12: note: declared here
582 | extern int getchar (void);
| ^~~~~~~
main.c:19:1: error: 'cat' ... |
s679379109 | p03997 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a =sc.nextInt(), b = sc.nextInt(), c = sc.nextInt();
System.out.println((a + b)*h/2);
}
} | Main.java:7: error: cannot find symbol
System.out.println((a + b)*h/2);
^
symbol: variable h
location: class Main
1 error
|
s829967588 | p03997 | C++ | a = int(raw_input())
b = int(raw_input())
h = int(raw_input())
print (a + b) * h / 2
| a.cc:1:1: error: 'a' does not name a type
1 | a = int(raw_input())
| ^
|
s413526257 | p03997 | C++ |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,n;
cin >> a >> b >> n;
cout << (a +b)*n << endl;
} | a.cc: In function 'int main()':
a.cc:8:18: error: '\U0000ff4e' was not declared in this scope
8 | cout << (a +b)*n << endl;
| ^~
|
s904889544 | p03997 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,n;
cin >> a >> b >> n;
cout << (a +b)*n << endl;
}
| a.cc: In function 'int main()':
a.cc:7:18: error: '\U0000ff4e' was not declared in this scope
7 | cout << (a +b)*n << endl;
| ^~
|
s963274506 | p03997 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,n;
cin >> a >> b >> n;
cout << (a +b)*h << endl;
}
| a.cc: In function 'int main()':
a.cc:7:18: error: 'h' was not declared in this scope
7 | cout << (a +b)*h << endl;
| ^
|
s496096708 | p03997 | C++ | #include <bits/tsdc++.h>
using namespace std;
int main() {
int a,b,n;
cin >> a >> b >> n;
cout << (a +b)*h << endl;
} | a.cc:1:10: fatal error: bits/tsdc++.h: No such file or directory
1 | #include <bits/tsdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s719321673 | p03997 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class MAIN {
public static void main(String[] args) throws NumberFormatException, IOException{
int a, b, h;
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader in = new BufferedReader(isr);... | Main.java:5: error: class MAIN is public, should be declared in a file named MAIN.java
public class MAIN {
^
1 error
|
s492078134 | p03997 | C++ | #include <iostream>
using namespace std;
int main() {
cin >> a >> b >> h;
cout << h * (a + b) / 2 << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:8: error: 'a' was not declared in this scope
5 | cin >> a >> b >> h;
| ^
a.cc:5:13: error: 'b' was not declared in this scope
5 | cin >> a >> b >> h;
| ^
a.cc:5:18: error: 'h' was not declared in this scope
5 | cin >> a >> b >> h;
|... |
s584782673 | p03997 | C++ | #include <iostream>
using namespace std;
int main(){
int a, b, h;
cin >> a
cin >> b
cin >> h
cout << (a+b)*h/2 << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:17: error: expected ';' before 'cin'
7 | cin >> a
| ^
| ;
8 | cin >> b
| ~~~
|
s737909033 | p03997 | C++ | #include <iostream>
using namespace std;
int main(){
int a, b, h;
cin >> a >> endl;
cin >> b >> endl;
cin >> h >> endl;
if (h%2=0)
{
cout << (a+b)*h/2 << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:18: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>')
7 | cin >> a >> endl;
| ~~~~~~~~~^~~~~~~
In file included from /usr/include/c+... |
s414581754 | p03997 | Java | class Main{
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int a = in.nextInt();
int b = in.nextInt();
int h = in.nextInt();
int area = (a+b)*(h/2);
System.out.println(area);
}
} | Main.java:3: error: cannot find symbol
Scanner in = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner in = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s762198572 | p03997 | C++ | <?php
$l1 = trim(fgets(STDIN));
$l2 = trim(fgets(STDIN));
$l3 = trim(fgets(STDIN));
echo ($l1 + $l2) * $l3 /2;
// print_r($sIn);
?>
| a.cc:1:1: error: expected unqualified-id before '<' token
1 | <?php
| ^
a.cc:3:5: error: '$l2' does not name a type
3 | $l2 = trim(fgets(STDIN));
| ^~~
a.cc:4:5: error: '$l3' does not name a type
4 | $l3 = trim(fgets(STDIN));
| ^~~
a.cc:5:10: error: expected constructor, de... |
s704709231 | p03997 | C | #include <stdio.h>
void main () {
int a,b,c,d
scanf("%d%d%d", &a, &b, &c);
d = ((a+b)*c)/2;
printf("%d\n",&d);
return;
} | main.c: In function 'main':
main.c:6:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
6 | scanf("%d%d%d", &a, &b, &c);
| ^~~~~
main.c:8:5: error: 'd' undeclared (first use in this function)
8 | d = ((a+b)*c)/2;
| ^
main.c:8:5: note: each undeclared identifier... |
s933509946 | p03997 | C | #include <stdio.h>
void main () {
int a,b,c,d
scanf("%d%d%d", &a,&b,&c);
d = ((a+b)*c)/2;
printf("%d\n",&d;
return;
} | main.c: In function 'main':
main.c:6:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
6 | scanf("%d%d%d", &a,&b,&c);
| ^~~~~
main.c:8:5: error: 'd' undeclared (first use in this function)
8 | d = ((a+b)*c)/2;
| ^
main.c:8:5: note: each undeclared identifier i... |
s154827864 | p03997 | Java | import java.util.*;
public class Trapezoids {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
if(h%2!=0){throw new Exception("error");}
else {
System.out.println((a+b)/2*h);
}
}
} | Main.java:3: error: class Trapezoids is public, should be declared in a file named Trapezoids.java
public class Trapezoids {
^
1 error
|
s464607218 | p03997 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void)
{
int a,b,c;
cin>>a>>b>>h;
int ans = a*b;
ans = ans + ((max(a,b)-min(a,b))*h)/2;
cout<<ans;
} | a.cc: In function 'int main()':
a.cc:8:14: error: 'h' was not declared in this scope
8 | cin>>a>>b>>h;
| ^
|
s773467491 | p03997 | Java | public class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
int a, b, h;
a = scan.newInt();
b = scan.newInt();
h = scan.newInt();
float area = (a+b)/2*h;
System.out.println(area);
}
}
} | Main.java:20: error: class, interface, enum, or record expected
}
^
1 error
|
s130687596 | p03997 | Java | public class Main {
public static void main(String args[]) {
int a, b, h;
float area = (a+b)/2*h;
System.out.println(area);
}
}
} | Main.java:13: error: class, interface, enum, or record expected
}
^
1 error
|
s588581352 | p03997 | C++ | #include <bits/stcd++.h>
using namespace std;
int a, b, h;
int main() {
cin >> a >> b >> h;
cout << (a + b) * h / 2 << endl;
return 0;
} | a.cc:1:10: fatal error: bits/stcd++.h: No such file or directory
1 | #include <bits/stcd++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s376868349 | p03997 | C++ | int main(){
int a,b,h;
cin>>a>>b>>h;
double ans;
ans = (a+b)*h/2;
cout<<ans<<endl;
} | a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
3 | cin>>a>>b>>h;
| ^~~
a.cc:6:5: error: 'cout' was not declared in this scope
6 | cout<<ans<<endl;
| ^~~~
a.cc:6:16: error: 'endl' was not declared in this scope
6 | cout<<ans<<endl;
... |
s629285657 | p03997 | C++ | int main(){
int a,b,h;
cin>>a>>b>>h;
int ans;
ans = (a+b)*h/2;
cout<<ans<<endl;
} | a.cc: In function 'int main()':
a.cc:3:1: error: 'cin' was not declared in this scope
3 | cin>>a>>b>>h;
| ^~~
a.cc:6:1: error: 'cout' was not declared in this scope
6 | cout<<ans<<endl;
| ^~~~
a.cc:6:12: error: 'endl' was not declared in this scope
6 | cout<<ans<<endl;
| ^~~~
|
s232601926 | p03997 | C++ | int a,b,h,ans;
return((a+b)*h/2); | a.cc:3:1: error: expected unqualified-id before 'return'
3 | return((a+b)*h/2);
| ^~~~~~
|
s350367233 | p03997 | C++ | #include <iostream>
using namespace;
int main() {
int a, b, c; cin >> a;cin>>b;cin>>c;
cout <<(a+b)*c/2<<endl;
} | a.cc:2:16: error: expected identifier before ';' token
2 | using namespace;
| ^
a.cc: In function 'int main()':
a.cc:4:14: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | int a, b, c; cin >> a;cin>>b;cin>>c;
| ^~~
| std::cin
In... |
s074548774 | p03997 | C++ | #include <stdio.h>
int main()
{
int a, b, c;
scanf("%d%d%d", &a, &b, &c):
printf("%d", (a+b)*c/2);
}
| a.cc: In function 'int main()':
a.cc:6:28: error: expected ';' before ':' token
6 | scanf("%d%d%d", &a, &b, &c):
| ^
| ;
|
s522525183 | p03997 | C++ | #include<iostream>
using namespace std;
int main(){
int a, b, c;
cin >> a;
cin >> b;
cin >> h;
cout << (a + b) * h / 2 << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:10: error: 'h' was not declared in this scope
9 | cin >> h;
| ^
|
s066073692 | p03997 | Java | import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner = new Scanner(System.in);
String a = sc.next();
String b = sc.next();
String c = sc.next();
final int al = a.length();
final int bl = b.length();
final int cl = c.length();
int aa = al;
int bb ... | Main.java:5: error: cannot find symbol
Scanner = new Scanner(System.in);
^
symbol: variable Scanner
location: class Main
Main.java:6: error: cannot find symbol
String a = sc.next();
^
symbol: variable sc
location: class Main
Main.java:7: error: cannot find symbol
String b = sc... |
s014876370 | p03997 | C++ |
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <algorithm>
#include <math.h>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <set>
#include <deque>
#include <stack>
#include <queue>
#define ll long long
#define vi vector<ll>
#define vs vector<string>
#define fr(i, k, n) for... | a.cc:34:11: error: extended character × is not valid in an identifier
34 | area=(a+b)×h/2;
| ^
a.cc: In function 'int main()':
a.cc:33:17: error: 'c' was not declared in this scope
33 | cin >>a>>b>>c;
| ^
a.cc:34:11: error: expected ';' before '\U000000d7h'
34 | area=(... |
s093604918 | p03997 | C++ |
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <algorithm>
#include <math.h>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <set>
#include <deque>
#include <stack>
#include <queue>
#define ll long long
#define vi vector<ll>
#define vs vector<string>
#define fr(i, k, n) for... | a.cc:34:16: error: extended character × is not valid in an identifier
34 | cout<<(a+b)×h/2;
| ^
a.cc: In function 'int main()':
a.cc:34:16: error: expected ';' before '\U000000d7h'
34 | cout<<(a+b)×h/2;
| ^~
| ;
|
s654259346 | p03997 | C++ | aaa | a.cc:1:1: error: 'aaa' does not name a type
1 | aaa
| ^~~
|
s655769527 | p03997 | Java | import java.util.*;
public class Main{
public static void main(String[] arg){
Scanner sc = new Scanner(Systen.in);
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
System.out.println((a+b)*h*0.5);
}
} | Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(Systen.in);
^
symbol: variable Systen
location: class Main
1 error
|
s124536492 | p03997 | Java | public class Main{
public static void main(String[] arg){
Scanner sc = new Scanner(Systen.in);
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
System.out.println((a+b)*h*0.5);
}
} | Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(Systen.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(Systen.in);
^
symbol: class Scanner
location: class Main
Main.... |
s991530523 | p03997 | Java | public class Main{
public static void main(String arg[]){
Scanner sc = new Scanner();
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
System.out.println((a+b)*h*0.5);
}
} | Main.java:4: error: cannot find symbol
Scanner sc = new Scanner();
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner();
^
symbol: class Scanner
location: class Main
2 errors
|
s484055346 | p03997 | C++ | huicg | a.cc:1:1: error: 'huicg' does not name a type
1 | huicg
| ^~~~~
|
s882461341 | p03997 | C++ | #include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define INF 1<<29
#define LINF LLONG_MAX/3
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define ALL(v) (v).begin(),(v).end()
#define debug(x) cerr<<#x<<":"<<x<<endl
#define de... | a.cc: In function 'int main()':
a.cc:27:8: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'll' {aka 'long long int'})
27 | cin>a>>b>>h;
| ~~~^~~~~~~~
| | |
| | ll {aka long long int}
| std::istream {aka st... |
s359403386 | p03997 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define REP(i,b) FOR(i,0,b)
#define INF 1e9
using ll = long long;
const ll mod = LLONG_MAX;
int main(){
int ia=0,ib=0,ic=0;
char a,b,c,x=a;
string Sa,Sb,Sc;
cin>>Sa>>Sb>>Sc;
while(1){
if (x==a){
x = Sa[ia];
ia++;... | a.cc: In function 'int main()':
a.cc:24:11: error: 'A' was not declared in this scope
24 | cout<<A<<endl;
| ^
a.cc:34:11: error: 'B' was not declared in this scope
34 | cout<<B<<endl;
| ^
a.cc:44:11: error: 'C' was not declared in this scope
44 | cout<<C<<endl;
... |
s380513443 | p03997 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define REP(i,b) FOR(i,0,b)
#define INF 1e9
using ll = long long;
const ll mod = LLONG_MAX;
int main(){
int ia=0,ib=0,ic=0;
char a,b,c,x=a;
string Sa,Sb,Sc;
cin>>sa>>sb>>sc;
while(1){
if (x==a){
x = Sa[ia];
ia++;... | a.cc: In function 'int main()':
a.cc:14:8: error: 'sa' was not declared in this scope; did you mean 'Sa'?
14 | cin>>sa>>sb>>sc;
| ^~
| Sa
a.cc:14:12: error: 'sb' was not declared in this scope; did you mean 'Sb'?
14 | cin>>sa>>sb>>sc;
| ^~
| Sb
a.cc:... |
s026246227 | p03997 | Java | import java.util.Scanner;
public class Trapezoids {
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: class Trapezoids is public, should be declared in a file named Trapezoids.java
public class Trapezoids {
^
1 error
|
s525499003 | p03997 | Java | package icpc;
import java.util.Scanner;
public class Trapezoids {
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:5: error: class Trapezoids is public, should be declared in a file named Trapezoids.java
public class Trapezoids {
^
1 error
|
s009013708 | p03997 | Java | 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
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s500488421 | p03997 | C++ | package main
import (
"bufio"
"fmt"
"os"
"strconv"
)
var sc = bufio.NewScanner(os.Stdin)
func nextLine() string {
sc.Scan()
return sc.Text()
}
func main() {
line := nextLine()
a, _ := strconv.Atoi(line)
line = nextLine()
b, _ := strconv.Atoi(line)
line = nextLine()
... | a.cc:1:1: error: 'package' does not name a type
1 | package main
| ^~~~~~~
a.cc:19:1: error: 'func' does not name a type
19 | func main() {
| ^~~~
|
s250728554 | p03997 | C | #include <stdio.h>
#include <string.h>
int main(){
int a,b,c;
scanf("%d",&a);
scanf("%d",&b);
scsnf("%d",&c);
int result=(a+b)*c/2;
printf("%d",result);
return 0;
} | main.c: In function 'main':
main.c:8:5: error: implicit declaration of function 'scsnf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
8 | scsnf("%d",&c);
| ^~~~~
| scanf
|
s583251116 | p03997 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// get a integer
int a = sc.nextInt();
// get two integers separated with half-width break
int b = sc.nextInt();
int c = sc.nextInt();
// get a string
//String s = sc.next();
// outp... | Main.java:18: error: reached end of file while parsing
}
^
1 error
|
s713492905 | p03997 | Java | public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// get a integer
int a = sc.nextInt();
// get two integers separated with half-width break
int b = sc.nextInt();
int c = sc.nextInt();
// get a string
//String s = sc.next();
// output
double res = (a+b)*c;
res = res / 2... | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args){
^
(use --enable-preview to enable unnamed classes)
1 error
|
s486490016 | p03997 | C | #include<stdio.h>
int main(void)
{
int a,b,h,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:13:12: error: stray '\' in program
13 | printf("%d"\n , s );
| ^
main.c:13:12: error: expected ')' before 'n'
13 | printf("%d"\n , s );
| ~ ^~
| )
|
s366342344 | p03997 | C | #include<stdio.h>
int main(void)
{
int a,b,h,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:7:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
7 | scanf("%d",&a);
| ^~~~~
main.c:11:1: error: 's' undeclared (first use in this function)
11 | s == (a+b)*h/2 ;
| ^
main.c:11:1: note: each undeclared identifier is reported only once for ... |
s008826435 | p03997 | C++ | #include<stdio.h>
int main(){
int a,b,h;
scanf("%d %d %d",&a,&b,&h);
printf("%d\n",(a+b)*h/2);
return 0;
] | a.cc: In function 'int main()':
a.cc:8:1: error: expected primary-expression before ']' token
8 | ]
| ^
a.cc:8:2: error: expected '}' at end of input
8 | ]
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s647827312 | p03997 | C++ | #include<stdio.h>
int main(){
int a,b,h;
scanf("%d %d %d",&a,&b,&h);
printf("%d\n",(a+b)*h\2);
} | a.cc:5:30: error: stray '\' in program
5 | printf("%d\n",(a+b)*h\2);
| ^
a.cc: In function 'int main()':
a.cc:5:30: error: expected ')' before numeric constant
5 | printf("%d\n",(a+b)*h\2);
| ~ ^~
| ... |
s247216376 | p03997 | C++ | #include<stdio.h>
int main(){
int a,b,h;
scanf("%d %d %d,&a,&b,&h);
printf("%d\n",(a+b)*h/2);
return 0;
} | a.cc:5:15: warning: missing terminating " character
5 | scanf("%d %d %d,&a,&b,&h);
| ^
a.cc:5:15: error: missing terminating " character
5 | scanf("%d %d %d,&a,&b,&h);
| ^~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:33: error: expected ')' be... |
s945434180 | p03997 | C++ | #include<stdio.h>
int main()
{
int a,b,h;
scanf("%d %d %d", &a, &b, &h);
printf("%d\n", (a+b)*h/2);
return 0:
} | a.cc: In function 'int main()':
a.cc:7:17: error: expected ';' before ':' token
7 | return 0:
| ^
| ;
a.cc:7:17: error: expected primary-expression before ':' token
|
s430049163 | 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;
} | a.cc: In function 'int main()':
a.cc:4:21: error: expected primary-expression before '%' token
4 | scanf("%d %d %d",%a,%b,%c);
| ^
a.cc:4:24: error: expected primary-expression before '%' token
4 | scanf("%d %d %d",%a,%b,%c);
| ^
a.cc:4:27: error: exp... |
s482047137 | p03997 | C++ | #include <stdio.h>
int main(){
int a,b,h;
scanf("%d %d %d",%a,%b,%c);
printf("%d",(a+b)*h/2);
} | a.cc: In function 'int main()':
a.cc:4:21: error: expected primary-expression before '%' token
4 | scanf("%d %d %d",%a,%b,%c);
| ^
a.cc:4:24: error: expected primary-expression before '%' token
4 | scanf("%d %d %d",%a,%b,%c);
| ^
a.cc:4:27: error: exp... |
s276265062 | p03997 | C++ | #include <stdio.h>
int main(){
int a,b,h;
scanf("%d %d %d",%a,%b,%c);
printf("%d",(a+b)8h/2);
} | a.cc: In function 'int main()':
a.cc:4:21: error: expected primary-expression before '%' token
4 | scanf("%d %d %d",%a,%b,%c);
| ^
a.cc:4:24: error: expected primary-expression before '%' token
4 | scanf("%d %d %d",%a,%b,%c);
| ^
a.cc:4:27: error: exp... |
s501732989 | p03997 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner x = new Scanner(System.in);
int a = x.nextInt();
int b = x.nextInt();
int c = x.nextInt();
System.out.println( (a+b)*c/2);
return 0;
}
} | Main.java:12: error: incompatible types: unexpected return value
return 0;
^
1 error
|
s587071949 | p03997 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner x = new Scanner(System.in);
int a = x.nextInt();
int b = x.nextInt();
int c = x.nextInt();
return (a+b)*c/2;
}
} | Main.java:11: error: incompatible types: unexpected return value
return (a+b)*c/2;
^
1 error
|
s608466182 | p03997 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner x = new Scanner(System.in);
a = x.nextInt();
b = x.nextInt();
c = x.nextInt();
return (a+b)*c/2;
}
} | Main.java:7: error: cannot find symbol
a = x.nextInt();
^
symbol: variable a
location: class Main
Main.java:8: error: cannot find symbol
b = x.nextInt();
^
symbol: variable b
location: class Main
Main.java:9: error: cannot find symbol
c = x.nextInt();
^
symbol: variable c
location: class Main
Main.jav... |
s219254524 | p03997 | C | #include<stdio.h>
int main(){
int a,b,c;
scanf("%d",a);
scanf("%d",b);
scanf("%d",c);
printf("%d",(a+b)*h*(1/2));
return 0;
} | main.c: In function 'main':
main.c:7:19: error: 'h' undeclared (first use in this function)
7 | printf("%d",(a+b)*h*(1/2));
| ^
main.c:7:19: note: each undeclared identifier is reported only once for each function it appears in
|
s583116600 | p03997 | Java | import java.util.Scanner;
/**
* archeryue
* 9/19/16
*/
public class A {
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.println((a + b) * h / 2)... | Main.java:7: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s980901301 | p03997 | C++ | #include <iostream>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <bitset>
#include <stack>
#include <utility>
#include <numeric>
#include <algorithm>
#include <functional>
#include <complex>
#include <string>
#include <sstream>
#include <fstream>
#include <cstdio>
#inclu... | a.cc: In function 'int main()':
a.cc:27:18: error: 'h' was not declared in this scope
27 | cout << (a+b)*h/2;
| ^
|
s252138273 | p03997 | C | #include <bits/stdc++.h> // {{{
// clang-format off
#define ARG4(_1, _2, _3, _4, ...) _4
#define rep(...) ARG4(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define REP(i, a) FOR(i, 0, a)
#define FOR(i, a, b) for (int i = (a); i < (int)(b); ++i)
#define rrep(...) ARG4(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
#define RREP(i, a) RFOR... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h> // {{{
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s825036457 | p03997 | C++ | #include <stdio.h>
#include <string.h>
#define TRUE 1
#define FALSE 0
using namespace std;
int main()
{
char a[100], b[100], c[100];
int i = 0, j = 0, k = 0;
int inda = 0, indb = 0, indc = 0;
gets(a);
gets(b);
gets(c);
int lena = strlen(a), lenb = strlen(b), lenc = strlen(c);
int cur... | a.cc: In function 'int main()':
a.cc:13:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
13 | gets(a);
| ^~~~
| getw
|
s317662934 | p03997 | C++ | #include <stdio.h>
#include <string.h>
#define TRUE 1
#define FALSE 0
using namespace std;
int main()
{
char a[100], b[100], c[100];
int i = 0, j = 0, k = 0;
int inda = 0, indb = 0, indc = 0;
gets(a);
gets(b);
gets(c);
int lena = strlen(a), lenb = strlen(b), lenc = strlen(c);
int cur... | a.cc: In function 'int main()':
a.cc:13:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
13 | gets(a);
| ^~~~
| getw
|
s845225284 | 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:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
7 | cin >> a >> b >> h;
| ^~~
a.cc:8:9: error: 'cout' was not declared in this scope
8 | cout << ((a + b)... |
s052439328 | p03997 | Java | import java.util.Scanner;
public class atc {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.println((sc.nextInt()+sc.nextInt())*sc.nextInt()/2);
}
} | Main.java:4: error: class atc is public, should be declared in a file named atc.java
public class atc {
^
1 error
|
s122758619 | p03997 | Java | public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.println(sc.nextInt()*sc.nextInt()/sc.nextInt()/2);
}
} | 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);
^
symbol: class Scanner
location: class Main
2 errors
|
s547516999 | p03997 | C++ | a = input()
b = input()
h = input()
print (a+b)*h/2 | a.cc:1:1: error: 'a' does not name a type
1 | a = input()
| ^
|
s289200996 | p03997 | C | #include<stdio.h>
int main(void)
{
int a,b,h,s;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);
s=(a+b)*h/2;
printf("%d",s);
getchar();
return0;
} | main.c: In function 'main':
main.c:12:17: error: 'return0' undeclared (first use in this function)
12 | return0;
| ^~~~~~~
main.c:12:17: note: each undeclared identifier is reported only once for each function it appears in
|
s958979065 | p03997 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string ss[3];
cin >> ss[0] >> ss[1] >> ss[2];
char cur;
cur = 'a';
while (ss[cur - 'a'].length()) {
char tmp = ss[cur][0];
ss[cur] = ss[cur].substr(1, npos);
cur = tmp;
}
cout << toUpper(cur) << endl;
} | a.cc: In function 'int main()':
a.cc:10:29: error: 'npos' was not declared in this scope
10 | ss[cur] = ss[cur].substr(1, npos);
| ^~~~
a.cc:13:9: error: 'toUpper' was not declared in this scope; did you mean 'toupper'?
13 | cout << toUpper(cur) << endl;
| ^~~~~~~
... |
s853376301 | p03997 | C++ | #include <cstdio>
using namespace std;
int main(){
int a,b,h;
scanf("%d %d %d",&a,&b,&h);
printf("%d\n",((a+b)*(h/2));
return 0;
} | a.cc: In function 'int main()':
a.cc:8:30: error: expected ')' before ';' token
8 | printf("%d\n",((a+b)*(h/2));
| ~ ^
| )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.