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 Main
Main.java:8: error: cannot find symbol
System.out.println((a + b) * h / 2);
^
symbol: variable a
location: class Main
Main.java:8: error: cannot find symbol
System.out.println((a + b) * h / 2);
^
symbol: variable b
location: class Main
Main.java:8: error: cannot find symbol
System.out.println((a + b) * h / 2);
^
symbol: variable h
location: class Main
6 errors
|
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;
| ^
a.cc:7:21: error: 'h' 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) * h / 2);
System.out.println(ans);
}
}
|
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) * h / 2);
System.out.println(ans);
}
}
|
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) * h / 2);
System.out.println(ans);
}
}
|
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) * h / 2);
System.out.println(ans);
}
}
|
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 vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
#define MAX 9999999
using namespace std;
typedef pair<int, int> pii;
typedef pair<double,double>pdd;
typedef pair<ll,ll>pll;
int main(){
int a,b,c,; cin>>a>>b>>c;
cout<<(a+b)*c/2<<endl;
}
|
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: note: candidate: 'operator>>(int, int)' (built-in)
7 | cout>>(a+b)*h/2;
| ~~~~^~~~~~~~~~~
a.cc:7:7: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:7:3: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
7 | cout>>(a+b)*h/2;
| ^~~~
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
7 | cout>>(a+b)*h/2;
| ^
/usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)'
1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
| ^~~~~~~~
/usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
7 | cout>>(a+b)*h/2;
| ^
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
7 | cout>>(a+b)*h/2;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
7 | cout>>(a+b)*h/2;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
7 | cout>>(a+b)*h/2;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
7 | cout>>(a+b)*h/2;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
7 | cout>>(a+b)*h/2;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
7 | cout>>(a+b)*h/2;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int]':
a.cc:7:17: required from here
7 | cout>>(a+b)*h/2;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)'
509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
7 | cout>>(a+b)*h/2;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143:
/usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)'
76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
7 | cout>>(a+b)*h/2;
| ^
/usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)'
106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
7 | cout>>(a+b)*h/2;
| ^
/usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)'
137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
7 | cout>>(a+b)*h/2;
| ^
/usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)'
177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
7 | cout>>(a+b)*h/2;
| ^
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)'
207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is
|
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(c == '\0'){
if (pos == 0){
printf("A");
} else if (pos == 1){
printf("B");
} else if (pos == 2){
printf("C");
}
break;
}//if
}//while
return 0;
}
|
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;
}else if(c == '\0'){
if (pos == 0){
printf("A");
} else if (pos == 1){
printf("B");
} else if (pos == 2){
printf("C");
}
break;
}//if
}//while
return 0;
}
|
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' 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
|
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);
a = Integer.parseInt(in.readLine());
b = Integer.parseInt(in.readLine());
h = Integer.parseInt(in.readLine());
System.out.println((a + b) * h / 2);
}
}
|
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++/14/iostream:42,
from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool&'
170 | operator>>(bool& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]'
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int&'
174 | operator>>(short& __n);
| ~~~~~~~^~~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int&'
177 | operator>>(unsigned short& __n)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]'
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int&'
181 | operator>>(int& __n);
| ~~~~~^~~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int&'
184 | operator>>(unsigned int& __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int&'
188 | operator>>(long& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int&'
192 | operator>>(unsigned long& __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int&'
199 | operator>>(long long& __n)
| ~~~~~~~~~~~^~~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int&'
203 | operator>>(unsigned long long& __n)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'void*&'
328 | operator>>(void*& __p)
| ~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]'
352 | operator>>(__streambuf_type* __sb);
| ^~~~~~~~
/usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'}
352 | operator>>(__streambuf_type* __sb);
|
|
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, destructor, or type conversion before '(' token
5 | echo ($l1 + $l2) * $l3 /2;
| ^
a.cc:8:1: error: expected unqualified-id before '?' token
8 | ?>
| ^
|
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 is reported only once for each function it appears in
|
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 is reported only once for each function it appears in
main.c:10:21: error: expected ')' before ';' token
10 | printf("%d\n",&d;
| ~ ^
| )
main.c:12:12: error: expected ';' before '}' token
12 | return;
| ^
| ;
13 | }
| ~
|
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 file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:5:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
5 | cout <<(a+b)*c/2<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:5:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
5 | cout <<(a+b)*c/2<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
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 = bl;
int cc = cl;
Char judge = a.charAt(al - aa);
aa = aa - 1;
while(true){
if(judge = 'a'){
if(aa == 0){break;}else{
judge = a.charAt(al - aa);
aa = aa -1;
}
}else if (judge = 'b') {
if(bb == 0){break;}else{
judge = b.charAt(bl - bb);
bb = bb -1;
}
}else if(judge = 'c'){
if(cc == 0){break;}else{
judge = c.charAt(cl - cc);
cc = cc -1;
}
}
}
if(judge == 'a'){Sytem.out.println("A");}else if(judge == 'b'){System.out.println("B");}else{System.out.println("C");}
}
}
|
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.next();
^
symbol: variable sc
location: class Main
Main.java:8: error: cannot find symbol
String c = sc.next();
^
symbol: variable sc
location: class Main
Main.java:15: error: cannot find symbol
Char judge = a.charAt(al - aa);
^
symbol: class Char
location: class Main
Main.java:35: error: package Sytem does not exist
if(judge == 'a'){Sytem.out.println("A");}else if(judge == 'b'){System.out.println("B");}else{System.out.println("C");}
^
6 errors
|
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 (ll i = k; i < n; i++)
#define rep(i, n) fr(i, 0, n)
#define alll(v) v.begin(), v.end()
#define mp(a, b) make_pair(a, b)
#define rdd(a) ll a; cin >> a
#define rrd rdd(a); rep(i, a)
//min({a,b,c,d})などの記法
using namespace std;
template <class X> void pr(X x) { cout << x << endl; }
template <class X> void prr(X x) { for (auto it : x) { cout << it << endl; } }
int func(int x){
return x*x+30;
}
int main() {
float a,b,h,area;
cin >>a>>b>>c;
area=(a+b)×h/2;
cout<<area;
return 0;
}
|
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=(a+b)×h/2;
| ^~
| ;
|
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 (ll i = k; i < n; i++)
#define rep(i, n) fr(i, 0, n)
#define alll(v) v.begin(), v.end()
#define mp(a, b) make_pair(a, b)
#define rdd(a) ll a; cin >> a
#define rrd rdd(a); rep(i, a)
//min({a,b,c,d})などの記法
using namespace std;
template <class X> void pr(X x) { cout << x << endl; }
template <class X> void prr(X x) { for (auto it : x) { cout << it << endl; } }
int func(int x){
return x*x+30;
}
int main() {
int a,b,h;
cin >>a>>b>>h;
cout<<(a+b)×h/2;
return 0;
}
|
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.java:4: error: cannot find symbol
Scanner sc = new Scanner(Systen.in);
^
symbol: variable Systen
location: class Main
3 errors
|
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 debug2(x,y) cerr<<#x<<","<<#y":"<<x<<","<<y<<endl
template<typename T> ostream& operator<<(ostream& os,const vector<T>& vec){ os << "["; for(const auto& v : vec){ os << v << ","; } os << "]"; return os; }
const long long mod = 1e9+7;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<vll> vvll;
int main(){
ll a,b,h;
cin>a>>b>>h;
cout << (a+b) * h / 2 << endl;
}
|
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 std::basic_istream<char>}
a.cc:27:8: note: candidate: 'operator>(int, ll {aka long long int})' (built-in)
27 | cin>a>>b>>h;
| ~~~^~~~~~~~
a.cc:27:8: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1176:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1176 | operator>(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1176:5: note: template argument deduction/substitution failed:
a.cc:27:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
27 | cin>a>>b>>h;
| ^
/usr/include/c++/14/bits/regex.h:1236:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1236 | operator>(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1236:5: note: template argument deduction/substitution failed:
a.cc:27:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
27 | cin>a>>b>>h;
| ^
/usr/include/c++/14/bits/regex.h:1329:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1329 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1329:5: note: template argument deduction/substitution failed:
a.cc:27:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
27 | cin>a>>b>>h;
| ^
/usr/include/c++/14/bits/regex.h:1403:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1403 | operator>(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1403:5: note: template argument deduction/substitution failed:
a.cc:27:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'll' {aka 'long long int'}
27 | cin>a>>b>>h;
| ^
/usr/include/c++/14/bits/regex.h:1497:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1497 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1497:5: note: template argument deduction/substitution failed:
a.cc:27:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
27 | cin>a>>b>>h;
| ^
/usr/include/c++/14/bits/regex.h:1573:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1573 | operator>(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1573:5: note: template argument deduction/substitution failed:
a.cc:27:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'll' {aka 'long long int'}
27 | cin>a>>b>>h;
| ^
/usr/include/c++/14/bits/regex.h:1673:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1673 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1673:5: note: template argument deduction/substitution failed:
a.cc:27:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
27 | cin>a>>b>>h;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed:
a.cc:27:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>'
27 | cin>a>>b>>h;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
462 | operator>(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed:
a.cc:27:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
27 | cin>a>>b>>h;
| ^
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
507 | operator>(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed:
a.cc:27:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
27 | cin>a>>b>>h;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1714 | operator>(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed:
a.cc:27:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
27 | cin>a>>b>>h;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1774 | operator>(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed:
a.cc:27:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
27 | cin>a>>b>>h;
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
695 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed:
a.cc:27:15: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
27 | cin>a>>b>>h;
| ^
/usr/include/c++/14/string_view:702:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
702 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed:
a.cc:27:15: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
27 | cin>a>>b>>h;
| ^
/usr/include/c++/14/string_view:710:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed:
a.cc:27:15: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'long long int'
27 | cin>a>>b>>h;
| ^
/usr/include/c++/14/bits/basic_string.h:3915:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3915 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3915:5: note: template argument deduction/substitution failed:
a.cc:27:15: note: 'std::istream' {aka 'std::basic_istream<char>'} is no
|
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++;
}
if (ia<Sa.size()){
cout<<A<<endl;
return 0;
}
if (x==b){
x = Sb[ib];
ib++;
}
if (ib<Sb.size()){
cout<<B<<endl;
return 0;
}
if (x==c){
x = Sc[ic];
ic++;
}
if (ic<Sc.size()){
cout<<C<<endl;
return 0;
}
}
|
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;
| ^
a.cc:48:2: error: expected '}' at end of input
48 | }
| ^
a.cc:10:11: note: to match this '{'
10 | int main(){
| ^
|
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++;
}
if (ia<Sa.size()){
cout<<A<<endl;
return 0;
}
if (x==b){
x = Sb[ib];
ib++;
}
if (ib<Sb.size()){
cout<<B<<endl;
return 0;
}
if (x==c){
x = Sc[ic];
ic++;
}
if (ic<S.size()){
cout<<C<<endl;
return 0;
}
}
|
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:14:16: error: 'sc' was not declared in this scope; did you mean 'Sc'?
14 | cin>>sa>>sb>>sc;
| ^~
| Sc
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:43:10: error: 'S' was not declared in this scope; did you mean 'Sc'?
43 | if (ic<S.size()){
| ^
| Sc
a.cc:44:11: error: 'C' was not declared in this scope
44 | cout<<C<<endl;
| ^
a.cc:48:2: error: expected '}' at end of input
48 | }
| ^
a.cc:10:11: note: to match this '{'
10 | int main(){
| ^
|
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()
h, _ := strconv.Atoi(line)
area := float64 ((a + b) * h) / 2
fmt.Print(area)
}
|
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();
// output
double res = (a+b)*c;
res = res / 2;
System.out.println(res);
}
|
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;
System.out.println(res);
}
|
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 each function it appears in
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 );
| ~ ^~
| )
|
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 ')' before ';' token
6 | printf("%d\n",(a+b)*h/2);
| ^
| )
a.cc:5:14: note: to match this '('
5 | scanf("%d %d %d,&a,&b,&h);
| ^
|
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: expected primary-expression before '%' token
4 | scanf("%d %d %d",%a,%b,%c);
| ^
a.cc:4:28: error: 'c' was not declared in this scope
4 | scanf("%d %d %d",%a,%b,%c);
| ^
|
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: expected primary-expression before '%' token
4 | scanf("%d %d %d",%a,%b,%c);
| ^
a.cc:4:28: error: 'c' was not declared in this scope
4 | scanf("%d %d %d",%a,%b,%c);
| ^
|
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: expected primary-expression before '%' token
4 | scanf("%d %d %d",%a,%b,%c);
| ^
a.cc:4:28: error: 'c' was not declared in this scope
4 | scanf("%d %d %d",%a,%b,%c);
| ^
a.cc:5:18: error: expected ')' before numeric constant
5 | printf("%d",(a+b)8h/2);
| ~ ^~
| )
|
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.java:11: error: incompatible types: unexpected return value
return (a+b)*c/2;
^
Main.java:11: error: cannot find symbol
return (a+b)*c/2;
^
symbol: variable a
location: class Main
Main.java:11: error: cannot find symbol
return (a+b)*c/2;
^
symbol: variable b
location: class Main
Main.java:11: error: cannot find symbol
return (a+b)*c/2;
^
symbol: variable c
location: class Main
7 errors
|
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>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <math.h>
#include <cmath>
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >> c;
cout << (a+b)*h/2;
}
|
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(i, 0, a)
#define RFOR(i, a, b) for (int i = (b)-1; i >= (int)(a); --i)
#define ALL(c) (c).begin(), (c).end()
#define TEN(n) ((ll)(1e##n))
#define pb emplace_back
#define mp make_pair
#define fi first
#define se second
#define USE1(T) template <typename T> inline
#define USE2(T, U) template <typename T, typename U> inline
#define mygc(c) (c) = getchar_unlocked()
#define mypc(c) putchar_unlocked(c)
template <typename T> using duo = std::pair<T, T>;
template <typename T> using vec = std::vector<T>;
using ll = long long;
using pii = duo<int>;
USE2(T,U)bool chmax(T&x,U a){return x<a&&(x=a,1);}
USE2(T,U)bool chmin(T&x,U a){return a<x&&(x=a,1);}
USE1(T=int)T in(){T x;std::cin>>x;return x;}
USE1(T=int)vec<T>in(int n){vec<T>v;v.reserve(n);rep(i,n)v.pb(in<T>());return v;}
USE1(T)vec<std::pair<T,int>>zipi(const vec<T>&x,int s=0){int N=x.size();vec<std::pair<T,int>>v;v.reserve(N);rep(i,N)v.pb(x[i],s+i);return v;}
USE1(T)vec<T>ndvec(T v,int n){return vec<T>(n,v);}
USE2(T,...Ts)auto ndvec(T v,int n,Ts...ns)->vec<decltype(ndvec(v,ns...))>{return ndvec(ndvec(v,ns...),n);}
USE1(T)void pr(T x){std::cout<<x<<'\n';}
USE2(T,...Ts)void pr(T x,Ts...xs){std::cout<<x<<' ';pr(xs...);}
USE1(T=int)T rd(){T x=0,m=0,k;for(;;){mygc(k);if(k=='-'){m=1;break;}if('0'<=k&&k<='9'){x=k-'0';break;}}for(;;){mygc(k);if(k<'0'||'9'<k)break;x=x*10+k-'0';}return x;}
USE1(T=int)void wr(T x,char c='\n'){int s=0,m=0;char b[32];if(x<0)m=1,x=-x;for(;x;x/=10)b[s++]=x%10;if(!s)b[s++]=0;if(m)mypc('-');for(;s--;)mypc(b[s]+'0');mypc(c);}
// clang-format on
// }}}
struct IoSetup { // {{{
IoSetup() {
std::ios::sync_with_stdio(0);
std::cin.tie(0);
std::cout.precision(10);
std::cerr.precision(10);
}
} iosetup; //}}}
using namespace std;
const int inf = 1001001001;
const ll infl = 1001001001001001001ll;
const int dd[] = {0, 1, 0, -1, 0};
signed main() {
int a = in(), b = in(), h = in();
pr((a + b) * h / 2);
return 0;
}
|
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 current = 1, flag = TRUE;
while (flag) {
while (current == 1) {
if (a[i] == 'b') {
current = 2;
}
else if (a[i] == 'c') {
current = 3;
}
++i;
if (i == lena) {
++inda;
flag = FALSE;
break;
}
}
//if (inda) break;
while (current == 2) {
//printf("\nHi there"); ///debugger#1
if (b[j] == 'a') {
current = 1;
}
else if (b[j] == 'c') {
current = 3;
}
++j;
if (j == lenb) {
++indb;
flag = FALSE;
break;
}
}
// if (indb) break;
while (current == 3) {
if (c[k] == 'b') {
current = 2;
}
else if (c[k] == 'a') {
current = 1;
}
++k;
if (k == lenc) {
++indc;
flag = FALSE;
break;
}
}
// if (indc) break;
}
//printf("%d %d %d\n %d %d %d", inda, indb, indc, i, j, k);
if (inda) printf("A");
else if (indb) printf("B");
else if (indc) printf("C");
return 0;
}
|
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 current = 1, flag = TRUE;
while (flag) {
while (current == 1) {
if (a[i] == 'b') {
current = 2;
}
else if (a[i] == 'c') {
current = 3;
}
++i;
if (i == lena) {
++inda;
flag = FALSE;
break;
}
}
//if (inda) break;
while (current == 2) {
//printf("\nHi there"); ///debugger#1
if (b[j] == 'a') {
current = 1;
}
else if (b[j] == 'c') {
current = 3;
}
++j;
if (j == lenb) {
++indb;
flag = FALSE;
break;
}
}
// if (indb) break;
while (current == 3) {
if (c[k] == 'b') {
current = 2;
}
else if (c[k] == 'a') {
current = 1;
}
++k;
if (k == lenc) {
++indc;
flag = FALSE;
break;
}
}
// if (indc) break;
}
//printf("%d %d %d\n %d %d %d", inda, indb, indc, i, j, k);
if (inda) printf("A");
else if (indb) printf("B");
else if (indc) printf("C");
return 0;
}
|
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) * h)/2 << endl;
| ^~~~
a.cc:8:36: error: 'endl' was not declared in this scope
8 | cout << ((a + b) * h)/2 << endl;
| ^~~~
|
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;
| ^~~~~~~
| toupper
|
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.