submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s542771336
|
p03997
|
C++
|
#include<bits/stdc++.h>
using namesapce std;
int main()
{
int a,b,c;
cin>>a>>b>c;
cout<<(a+b)*c/2;
return 0;
}
|
a.cc:2:7: error: expected nested-name-specifier before 'namesapce'
2 | using namesapce std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin>>a>>b>c;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
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:7:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
7 | cout<<(a+b)*c/2;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s071808215
|
p03997
|
C++
|
#include<cstdio>
#include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin >> a >> b >> c;
cout << (a+b)*c/2
}
|
a.cc: In function 'int main()':
a.cc:10:19: error: expected ';' before '}' token
10 | cout << (a+b)*c/2
| ^
| ;
......
14 | }
| ~
|
s773792124
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int a, b, h;
int main () {
cin >> a >> b >> h;
cout << ((a + b) / 2) * h << endl;
}
|
a.cc:8:27: error: extended character is not valid in an identifier
8 | cout << ((a + b) / 2) * h << endl;
| ^
a.cc: In function 'int main()':
a.cc:8:27: error: 'h\U00003000' was not declared in this scope
8 | cout << ((a + b) / 2) * h << endl;
| ^~~
|
s446351488
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int a, b, h;
int main () {
cin >> a >> b >> h;
cout << (a + b) / 2 * h << endl;
}
|
a.cc:8:25: error: extended character is not valid in an identifier
8 | cout << (a + b) / 2 * h << endl;
| ^
a.cc: In function 'int main()':
a.cc:8:25: error: 'h\U00003000' was not declared in this scope
8 | cout << (a + b) / 2 * h << endl;
| ^~~
|
s736082314
|
p03997
|
Java
|
import jaav.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
System.out.println((a+b)*h/2);
}
}
|
Main.java:1: error: package jaav.util does not exist
import jaav.util.*;
^
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
3 errors
|
s347913010
|
p03997
|
C++
|
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
using namespace std;
int main(){
int a,b,c;
cin>>(a+b)/c<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:12: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
9 | cin>>(a+b)/c<<endl;
| ~~~^~~~~~~~~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
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>]' (near match)
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:19: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'int'
9 | cin>>(a+b)/c<<endl;
| ~~~~~^~
/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>]' (near match)
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:19: error: cannot bind non-const lvalue reference of type 'short int&' to a value of type 'int'
9 | cin>>(a+b)/c<<endl;
| ~~~~~^~
/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>]' (near match)
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:19: error: cannot bind non-const lvalue reference of type 'short unsigned int&' to a value of type 'int'
9 | cin>>(a+b)/c<<endl;
| ~~~~~^~
/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>]' (near match)
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:19: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
9 | cin>>(a+b)/c<<endl;
| ~~~~~^~
/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>]' (near match)
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:19: error: cannot bind non-const lvalue reference of type 'unsigned int&' to a value of type 'int'
9 | cin>>(a+b)/c<<endl;
| ~~~~~^~
/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>]' (near match)
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:19: error: cannot bind non-const lvalue reference of type 'long int&' to a value of type 'int'
9 | cin>>(a+b)/c<<endl;
| ~~~~~^~
/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>]' (near match)
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:19: error: cannot bind non-const lvalue reference of type 'long unsigned int&' to a value of type 'int'
9 | cin>>(a+b)/c<<endl;
| ~~~~~^~
/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>]' (near match)
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:19: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int'
9 | cin>>(a+b)/c<<endl;
| ~~~~~^~
/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>]' (near match)
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:19: error: cannot bind non-const lvalue reference of type 'long long unsigned int&' to a value of type 'int'
9 | cin>>(a+b)/c<<endl;
| ~~~~~^~
/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>]' (near match)
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:19: error: cannot bind non-const lvalue reference of type 'float&' to a value of type 'int'
9 | cin>>(a+b)/c<<endl;
| ~~~~~^~
/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>]' (near match)
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:19: error: cannot bind non-const lvalue reference of type 'double&' to a value of type 'int'
9 | cin>>(a+b)/c<<endl;
| ~~~~~^~
/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>]' (near match)
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:19: error: cannot bind non-const lvalue reference of type 'long double&' to a value of type 'int'
9 | cin>>(a+b)/c<<endl;
| ~~~~~^~
/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>]' (near match)
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:19: error: invalid conversion from 'int' to 'void*' [-fpermissive]
9 | cin>>(a+b)/c<<endl;
| ~~~~~^~
| |
| int
a.cc:9:19: error: cannot bind rvalue '(void*)((long int)((a + b) / c))' to 'void*&'
/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>]' (near match)
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:19: error: invalid conversion from 'int' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} [-fpermissive]
9 | cin>>(a+b)/c<<endl;
| ~~~~~^~
| |
| int
/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>]' (near match)
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:7: note: conversion of argument 1 would be ill-formed:
a.cc:9:19: error: invalid conversion from 'int' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} [-fpermissive]
9 | cin>>(a+b)/c<<endl;
| ~~~~~^~
| |
| int
/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>]' (near match)
133 | operator>>(ios_base& (*__pf)(i
|
s877736351
|
p03997
|
C++
|
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
using namespace std;
int main(){
int a,b,c;
cin>>(a+b)/h<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:20: error: 'h' was not declared in this scope
9 | cin>>(a+b)/h<<endl;
| ^
|
s186788179
|
p03997
|
Java
|
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.*;
public class MAIN {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
Scanner in = new Scanner(inputStream);
PrintWriter out = new PrintWriter(outputStream);
double a = in.nextInt();
double b = in.nextInt();
double h = in.nextInt();
int ans = (int)(((a+b)/2)*h);
System.out.println(ans);
}
}
|
Main.java:5: error: class MAIN is public, should be declared in a file named MAIN.java
public class MAIN {
^
1 error
|
s706485648
|
p03997
|
C++
|
/*
このコード、と~おれ!
Be accepted!
∧_∧
(。・ω・。)つ━☆・*。
⊂ ノ ・゜+.
しーJ °。+ *´¨)
.· ´¸.·*´¨) ¸.·*¨)
(¸.·´ (¸.·'* ☆
*/
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define printyn(test) printf(test ? "YES\n" : "NO\n");
#define all(x) (x).begin(), (x).end()
using ll = long long;
#include <stdio.h>
#include <algorithm>
//#include <vector>
using namespace std;
int main() {
int a, b, h;
scanf("%d%d%d", &a, &b, &c);
printf("%d\n", (a + b) * h);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:28:34: error: 'c' was not declared in this scope
28 | scanf("%d%d%d", &a, &b, &c);
| ^
|
s180974026
|
p03997
|
C++
|
#include <iostream>
using namespace std;
int main(){
int a, b, h
cin >> a >> b >> h;
cout << (a + b) * h / 2;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:9: error: expected initializer before 'cin'
6 | cin >> a >> b >> h;
| ^~~
a.cc:7:27: error: 'h' was not declared in this scope
7 | cout << (a + b) * h / 2;
| ^
|
s326594288
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace;
int main(){
int a, b, h;
cin >> a >> b >> h;
cout << (a+b)*h/2 << endl;
return 0;
}
|
a.cc:2:16: error: expected identifier before ';' token
2 | using namespace;
| ^
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> a >> b >> h;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
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:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
6 | cout << (a+b)*h/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:6:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
6 | cout << (a+b)*h/2 << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
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/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s732002896
|
p03997
|
C++
|
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0;i < (n); ++i)
using namespace std;
int main(){
int a,b,h;
cin >> a >> b >> h;
cout << (a+b)*h/2
return 0;
}
|
a.cc: In function 'int main()':
a.cc:11:20: error: expected ';' before 'return'
11 | cout << (a+b)*h/2
| ^
| ;
......
14 | return 0;
| ~~~~~~
|
s645973778
|
p03997
|
Java
|
import java.util.*;
public class ABC045A{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
int b=sc.nextInt();
int h=sc.nextInt();
sc.close();
int s=(a+b)*h/2;
System.out.println(s);
}
}
|
Main.java:2: error: class ABC045A is public, should be declared in a file named ABC045A.java
public class ABC045A{
^
1 error
|
s171221779
|
p03997
|
Java
|
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
int b=sc.nextInt();
int c=sc.nextInt();
int trapezoid=(a+b)*h/2;
System.out.println(trapezoid);
}
}
|
Main.java:10: error: cannot find symbol
int trapezoid=(a+b)*h/2;
^
symbol: variable h
location: class Main
1 error
|
s029355157
|
p03997
|
C++
|
#include<iostream>
using namespace std;
int a,b,h;
int main()
{
scanf("%d%d%d",&a,&b,&h)
cout<<(a+b)*h/2;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:29: error: expected ';' before 'cout'
6 | scanf("%d%d%d",&a,&b,&h)
| ^
| ;
7 | cout<<(a+b)*h/2;
| ~~~~
|
s474484384
|
p03997
|
C
|
#include <stdio.h>
int main(){
int a,b,h;
csanf("%d",&a);
csanf("%d",&b);
csanf("%d",&h);
printf("%d\n",(a+b)*h/2);
return(0);
}
|
main.c: In function 'main':
main.c:5:3: error: implicit declaration of function 'csanf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | csanf("%d",&a);
| ^~~~~
| scanf
|
s377067757
|
p03997
|
C
|
#include <stdio.h>
int main(){
int a,b,h;
csanf("%d",&a);
csanf("%d",&b);
csanf("%d",&h);
printf("%d\n",(a+b)*h/2);
return(0);
}
|
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'csanf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
4 | csanf("%d",&a);
| ^~~~~
| scanf
|
s853311120
|
p03997
|
C
|
#includ <stdio.h>
int main(){
int a,b,h;
csanf("%d",&a);
csanf("%d",&b);
csanf("%d",&h);
printf("%d\n",(a+b)*h/2);
return(0);
}
|
main.c:1:2: error: invalid preprocessing directive #includ; did you mean #include?
1 | #includ <stdio.h>
| ^~~~~~
| include
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'csanf' [-Wimplicit-function-declaration]
4 | csanf("%d",&a);
| ^~~~~
main.c:7:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
7 | printf("%d\n",(a+b)*h/2);
| ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
+++ |+#include <stdio.h>
1 | #includ <stdio.h>
main.c:7:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
7 | printf("%d\n",(a+b)*h/2);
| ^~~~~~
main.c:7:3: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s603224768
|
p03997
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
int main(void){
// Your code here!
int a, b, h;
cin >> a >> b >> h;
cout << (a+b) * h / 2
}
|
a.cc: In function 'int main()':
a.cc:9:25: error: expected ';' before '}' token
9 | cout << (a+b) * h / 2
| ^
| ;
10 | }
| ~
|
s152905122
|
p03997
|
Java
|
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in); //台形の面積を求める
int a = sc.nextInt(); //上辺
int b = sc.nextInt(); //下辺
int h = sc.nextInt(); //高さ
int ans;
(a+b)*h/2=ans;
System.out.println(ans);
}
}
|
Main.java:11: error: unexpected type
(a+b)*h/2=ans;
^
required: variable
found: value
1 error
|
s161904418
|
p03997
|
Java
|
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in); //台形の面積を求める
int a = sc.nextInt(); //上辺
int b = sc.nextInt(); //下辺
int h = sc.nextInt(); //高さ
int ans;
(a+b)*h/2=ans;
System.out.println(ans);
}
}
|
Main.java:11: error: unexpected type
(a+b)*h/2=ans;
^
required: variable
found: value
1 error
|
s618690910
|
p03997
|
Java
|
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in); //台形の面積を求める
int a = sc.nextInt(); //上辺
int b = sc.nextInt(); //下辺
int h = sc.nextInt(); //高さ
int ans;
(a+b)*h/2 = ans;
System.out.println(ans);
}
}
|
Main.java:11: error: unexpected type
(a+b)*h/2 = ans;
^
required: variable
found: value
1 error
|
s750673644
|
p03997
|
Java
|
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in); //台形の面積を求める
int a = sc.nextInt(); //上辺
int b = sc.nextInt(); //下辺
int h = sc.nextInt(); //高さ
int ans;
(a + b)*h/2 = ans;
}
}
|
Main.java:11: error: unexpected type
(a + b)*h/2 = ans;
^
required: variable
found: value
1 error
|
s708252062
|
p03997
|
Java
|
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in); //台形の面積を求める
int a = sc.nextInt(); //上辺
int b = sc.nextInt(); //下辺
int h = sc.nextInt(); //高さ
int ans;
(a + b) * h / 2 = ans;
}
}
|
Main.java:11: error: unexpected type
(a + b) * h / 2 = ans;
^
required: variable
found: value
1 error
|
s340366186
|
p03997
|
Java
|
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in); //台形の面積を求める
int a = sc.nextInt(); //上辺
int b = sc.nextInt(); //下辺
int h = sc.nextInt(); //高さ
int ans;
(a + b) * h / 2 = ans;
}
|
Main.java:13: error: reached end of file while parsing
}
^
1 error
|
s783350964
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a, b, h; cin >> a >> b >> h;
cout << (a + b) * (h\2) << endl;
}
|
a.cc:6:25: error: stray '\' in program
6 | cout << (a + b) * (h\2) << endl;
| ^
a.cc: In function 'int main()':
a.cc:6:25: error: expected ')' before numeric constant
6 | cout << (a + b) * (h\2) << endl;
| ~ ^~
| )
|
s973665050
|
p03997
|
C++
|
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
#define rep1(i,n) for (int i = 1; i <= (n); i++)
#define repi(i,a,b) for (int i = (a); i < (b); i++)
#define all(x) (x).begin(),(x).end()
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
int main() {
int a, b, h;
cin << a << b << h;
cout << (a+b)*h/2 << endl;
}
|
a.cc: In function 'int main()':
a.cc:19:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
19 | cin << a << b << h;
| ~~~ ^~ ~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:19:7: note: candidate: 'operator<<(int, int)' (built-in)
19 | cin << a << b << h;
| ~~~~^~~~
a.cc:19:7: 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:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)'
1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed:
a.cc:19:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
19 | cin << a << b << h;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:19:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte'
19 | 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:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:19:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
19 | cin << a << b << h;
| ^
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:19:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
19 | cin << a << b << h;
| ^
/usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)'
1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed:
a.cc:19:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
19 | cin << a << b << h;
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46,
from /usr/include/c++/14/streambuf:43,
from /usr/include/c++/14/bits/streambuf_iterator.h:35,
from /usr/include/c++/14/iterator:66,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:19:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
19 | cin << a << b << h;
| ^
In file included from /usr/include/c++/14/memory:80,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56:
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)'
70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed:
a.cc:19:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
19 | cin << a << b << h;
| ^
In file included from /usr/include/c++/14/istream:41,
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/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:19:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
19 | cin << a << b << h;
| ^
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:19:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
19 | cin << a << b << h;
| ^
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:19:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
19 | cin << a << b << h;
| ^
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:19:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
19 | cin << a << b << h;
| ^
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed:
a.cc:19:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
19 | cin << a << b << h;
| ^
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed:
a.cc:19:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
19 | cin << a << b << h;
| ^
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed:
a.cc:19:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
19 | cin << a << b << h;
| ^
/usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)'
671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed:
a.cc:19:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
19 | cin << a << b << h;
|
|
s874780777
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin >>a>>b>>c;
cout << (a+b)*c/;2
}
|
a.cc: In function 'int main()':
a.cc:6:19: error: expected primary-expression before ';' token
6 | cout << (a+b)*c/;2
| ^
a.cc:6:21: error: expected ';' before '}' token
6 | cout << (a+b)*c/;2
| ^
| ;
7 | }
| ~
|
s745035950
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main () {
int a,b,h.area;
cin >> a >> b >> h;
area=((a+b)*h)/2;
cout << area <<endl;
}
|
a.cc: In function 'int main()':
a.cc:4:12: error: expected initializer before '.' token
4 | int a,b,h.area;
| ^
a.cc:5:20: error: 'h' was not declared in this scope
5 | cin >> a >> b >> h;
| ^
a.cc:6:3: error: 'area' was not declared in this scope
6 | area=((a+b)*h)/2;
| ^~~~
|
s253869948
|
p03997
|
C++
|
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >> c;
cout << (a+b)*h/2 << endl;
}
|
a.cc: In function 'int main()':
a.cc:9:19: error: 'h' was not declared in this scope
9 | cout << (a+b)*h/2 << endl;
| ^
|
s148332041
|
p03997
|
C++
|
include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,h;
cin >> a >> b >> h;
cout << (a+b)*h/2 << endl;
}
|
a.cc:1:1: error: 'include' does not name a type
1 | include <bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
5 | cin >> a >> b >> h;
| ^~~
a.cc:6:3: error: 'cout' was not declared in this scope
6 | cout << (a+b)*h/2 << endl;
| ^~~~
a.cc:6:24: error: 'endl' was not declared in this scope
6 | cout << (a+b)*h/2 << endl;
| ^~~~
|
s265644937
|
p03997
|
C++
|
#include <iostream>
using namespace std;
int main(){
int a, b, h;
cin >> a >> b >> h;
cout << (a + b) * h / 2 << endl;
|
a.cc: In function 'int main()':
a.cc:6:41: error: expected '}' at end of input
6 | cout << (a + b) * h / 2 << endl;
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s845796072
|
p03997
|
Java
|
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Byte[] daikeihen = new Byte[3];
daikeihen[0] = sc.nextByte();
daikeihen[1] = sc.nextByte();
daikeihen[2] = sc.nextByte();
System.out.println((daikeihen[0] + daikeihen[1]) * daikeihen[2] / 2);
}
|
Main.java:11: error: reached end of file while parsing
}
^
1 error
|
s289728944
|
p03997
|
Java
|
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
byte[] daikeihen = new byte[3];
for(int i = 0;i <= 2; i++){
daikeihen[i] = sc.nextInt();
}System.out.println((daikeihen[0] + daikeihen[1]) * daikeihen[2] / 2);
}
}
|
Main.java:8: error: incompatible types: possible lossy conversion from int to byte
daikeihen[i] = sc.nextInt();
^
1 error
|
s436182211
|
p03997
|
Java
|
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
byte[] daikeihen = new byte[3];
for(byte i = 0;i <= 2; i++){
daikeihen[i] = sc.nextInt();
}System.out.println((daikeihen[0] + daikeihen[1]) * daikeihen[2] / 2);
}
}
|
Main.java:8: error: incompatible types: possible lossy conversion from int to byte
daikeihen[i] = sc.nextInt();
^
1 error
|
s536748779
|
p03997
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a, b, h;
cin >> a >> b >> h;
int ans = ((a+b) * h) /;
cout << ans << endl;
}
|
a.cc: In function 'int main()':
a.cc:7:26: error: expected primary-expression before ';' token
7 | int ans = ((a+b) * h) /;
| ^
|
s133215532
|
p03997
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,h,s;
cin >> a >> b >>c;
cout << ((a+b)*h)*0.5 << endl;
}
|
a.cc: In function 'int main()':
a.cc:6:19: error: 'c' was not declared in this scope
6 | cin >> a >> b >>c;
| ^
|
s872994653
|
p03997
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,h,s;
cin >> a,b,c;
cout << ((a+b)*h)*0.5 << endl;
}
|
a.cc: In function 'int main()':
a.cc:6:14: error: 'c' was not declared in this scope
6 | cin >> a,b,c;
| ^
|
s774177976
|
p03997
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,h,s;
cin >> a b c;
cout << ((a+b)*h)*0.5 << endl;
}
|
a.cc: In function 'int main()':
a.cc:6:11: error: expected ';' before 'b'
6 | cin >> a b c;
| ^~
| ;
|
s188221398
|
p03997
|
C++
|
#include<stdio.h>
int main(void)
{
int a,h,b,e;
1<a,b,c<100;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);
e=(a+b)*h/2;
printf("%d\n",e);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:5:15: error: 'c' was not declared in this scope
5 | 1<a,b,c<100;
| ^
|
s870364542
|
p03997
|
C++
|
#include<stdio.h>
int main(void)
{
int a,h,b,e;
1<a,b,c<100;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);
e=(a+b)*h/2;
printf("%d\n",s);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:5:15: error: 'c' was not declared in this scope
5 | 1<a,b,c<100;
| ^
a.cc:10:23: error: 's' was not declared in this scope
10 | printf("%d\n",s);
| ^
|
s835123083
|
p03997
|
C++
|
#include<stdio.h>
int main(void)
{
int a,h,b,e;
1<a,b,c<100;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);
e=(a+b)*h/2;
printf("%d\n",s);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:5:15: error: 'c' was not declared in this scope
5 | 1<a,b,c<100;
| ^
a.cc:10:23: error: 's' was not declared in this scope
10 | printf("%d\n",s);
| ^
|
s198546748
|
p03997
|
C++
|
#include<stdio.h>
int main(void)
{
int a,h,b,e;
1<a,b,c<100;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);
e=(a+d)*h/2;
printf("%d\n",s);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:5:15: error: 'c' was not declared in this scope
5 | 1<a,b,c<100;
| ^
a.cc:9:14: error: 'd' was not declared in this scope
9 | e=(a+d)*h/2;
| ^
a.cc:10:23: error: 's' was not declared in this scope
10 | printf("%d\n",s);
| ^
|
s106934709
|
p03997
|
C++
|
#include<stdio.h>
int main(void)
{
int a,h,b,e;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);
e=(a+d)*h/2;
printf("%d\n",s);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:14: error: 'd' was not declared in this scope
8 | e=(a+d)*h/2;
| ^
a.cc:9:23: error: 's' was not declared in this scope
9 | printf("%d\n",s);
| ^
|
s396690774
|
p03997
|
C++
|
#include<stdio.h>
int main(void)
{
int a,h,b,e;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);
e=(a+d)*h;
printf("%d\n",s);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:14: error: 'd' was not declared in this scope
8 | e=(a+d)*h;
| ^
a.cc:9:23: error: 's' was not declared in this scope
9 | printf("%d\n",s);
| ^
|
s251608778
|
p03997
|
C++
|
#include<stdio.h>
int main(void)
{
int a,h,d,e;
scanf("%d",&a);
scanf("%d",&d);
scanf("%d",&h);
e=(a+d)*h;
printf("%d\n",s);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:23: error: 's' was not declared in this scope
9 | printf("%d\n",s);
| ^
|
s758571406
|
p03997
|
C
|
#include<stdio.h>
int main(){
int a, b, h;
a = 4;
scanf("%d", &a);
b=5
scanf("%d", &b);
h=6
scanf("%d", &h);
printf("%d\n",(a+b)*h);
return 0;
}
|
main.c: In function 'main':
main.c:10:8: error: expected ';' before 'scanf'
10 | b=5
| ^
| ;
11 | scanf("%d", &b);
| ~~~~~
main.c:12:8: error: expected ';' before 'scanf'
12 | h=6
| ^
| ;
13 | scanf("%d", &h);
| ~~~~~
|
s501441905
|
p03997
|
C
|
#include<stdio.h>
int main(){
int a, b, h;
a = 4;
b = 5;
h = 6;
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &h);
printf("%d\n",(a+b)*h=));
return 0;
}
|
main.c: In function 'main':
main.c:16:27: error: expected expression before ')' token
16 | printf("%d\n",(a+b)*h=));
| ^
main.c:16:28: error: expected statement before ')' token
16 | printf("%d\n",(a+b)*h=));
| ^
|
s406470725
|
p03997
|
C
|
#include<stdio.h>
int main(){
int a, b, h;
a = 4;
b = 5;
h = 6;
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &h);
printf("%d\n",(a+b)*h=);
return 0;
}
|
main.c: In function 'main':
main.c:16:27: error: expected expression before ')' token
16 | printf("%d\n",(a+b)*h=);
| ^
|
s399862827
|
p03997
|
C
|
#include<stdio.h>
int main()
{
int a, b, h;
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &h);
printf("%dn", (a + b) * h / 2;
return 0;
}
|
main.c: In function 'main':
main.c:9:34: error: expected ')' before ';' token
9 | printf("%dn", (a + b) * h / 2;
| ~ ^
| )
main.c:10:14: error: expected ';' before '}' token
10 | return 0;
| ^
| ;
11 | }
| ~
|
s877606110
|
p03997
|
C++
|
#include<stdio.h>
int main()
{
int a, b, h;
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &h);
printf("%dn", (a + b) * h / 2;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:34: error: expected ')' before ';' token
9 | printf("%dn", (a + b) * h / 2;
| ~ ^
| )
|
s477871844
|
p03997
|
C
|
#include<stdio.h>
int main(){
printf("5\n");
printf("6\n");
printf("6\n");
return 0
}
|
main.c: In function 'main':
main.c:8:11: error: expected ';' before '}' token
8 | return 0
| ^
| ;
9 | }
| ~
|
s385134142
|
p03997
|
C++
|
3
4
2
|
a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3
| ^
|
s424467189
|
p03997
|
C++
|
#include <iostream>
using namespace std;
int main {
int a,b,c;
cin >> a >> b >> c;
cout << (a + b)*c << endl;
return 0;
}
|
a.cc:3:5: error: cannot declare '::main' to be a global variable
3 | int main {
| ^~~~
a.cc:4:5: error: expected primary-expression before 'int'
4 | int a,b,c;
| ^~~
a.cc:4:5: error: expected '}' before 'int'
a.cc:3:10: note: to match this '{'
3 | int main {
| ^
a.cc:5:5: error: 'cin' does not name a type
5 | cin >> a >> b >> c;
| ^~~
a.cc:6:5: error: 'cout' does not name a type
6 | cout << (a + b)*c << endl;
| ^~~~
a.cc:7:5: error: expected unqualified-id before 'return'
7 | return 0;
| ^~~~~~
a.cc:8:1: error: expected declaration before '}' token
8 | }
| ^
|
s273256372
|
p03997
|
C++
|
#include <iostream>
#include <stdio.h>
#include <algorithm>
using namespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
int sum = 0;
sum = ((a + b) * c)2;
cout << sum << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:13:24: error: expected ';' before numeric constant
13 | sum = ((a + b) * c)2;
| ^
| ;
|
s319364864
|
p03997
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(void){
int a,b,h;
cin>>a>>b>>h;
cout<<()(a+b)*h)/2<<endl;
}
|
a.cc: In function 'int main()':
a.cc:8:10: error: expected primary-expression before ')' token
8 | cout<<()(a+b)*h)/2<<endl;
| ^
|
s417588751
|
p03997
|
C++
|
#include<bits/stdc++>
using namespace std;
int main(void){
int a,b,h;
cin>>a>>b>>h;
cout<<()(a+b)*h)/2<<endl;
}
|
a.cc:1:9: fatal error: bits/stdc++: No such file or directory
1 | #include<bits/stdc++>
| ^~~~~~~~~~~~~
compilation terminated.
|
s869965821
|
p03997
|
C++
|
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <string>
int main(int argc, char* argv[]) {
std::cin.tie(0);
std::ios::sync_with_stdio(false);
/* */
int a, b, h;
std::cin >> a >> b >> c;
std::cout << (a + b) * c / 2 << std::endl;
/* */
return EXIT_SUCCESS;
}
|
a.cc: In function 'int main(int, char**)':
a.cc:14:25: error: 'c' was not declared in this scope
14 | std::cin >> a >> b >> c;
| ^
|
s372214579
|
p03997
|
C++
|
#include <iostream>
using namespace std;
int main()
{
int a, b, h;
cin >> a >> b >> h;
cout << (a + b) * h / 2 << endl;
return 0;
}
yatsu
|
a.cc:10:1: error: 'yatsu' does not name a type
10 | yatsu
| ^~~~~
|
s110782296
|
p03997
|
C++
|
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cstring>
#include <complex>
#include <stack>
#include <queue>
#include <unordered_map>
#include <map>
#define rep(i, a) for (int i = 0; i < (a); i++)
using namespace std;
using ll = long long int;
int main(){
cin >> a >> b >> h;
cout << a*b*h/2 << endl;
}
|
a.cc: In function 'int main()':
a.cc:16:12: error: 'a' was not declared in this scope
16 | cin >> a >> b >> h;
| ^
a.cc:16:17: error: 'b' was not declared in this scope
16 | cin >> a >> b >> h;
| ^
a.cc:16:22: error: 'h' was not declared in this scope
16 | cin >> a >> b >> h;
| ^
|
s899001700
|
p03997
|
C++
|
int main() {
int a, b, h;
cin >> a >> b >> h;
cout << (a + b) * h / 2 << endl;
}
|
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
3 | cin >> a >> b >> h;
| ^~~
a.cc:4:3: error: 'cout' was not declared in this scope
4 | cout << (a + b) * h / 2 << endl;
| ^~~~
a.cc:4:30: error: 'endl' was not declared in this scope
4 | cout << (a + b) * h / 2 << endl;
| ^~~~
|
s590587407
|
p03997
|
C++
|
int main(){
int a, b, h;
cin >> a >> b >> h;
cout << (a + b) * h / 2 << endl;
|
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
3 | cin >> a >> b >> h;
| ^~~
a.cc:4:3: error: 'cout' was not declared in this scope
4 | cout << (a + b) * h / 2 << endl;
| ^~~~
a.cc:4:30: error: 'endl' was not declared in this scope
4 | cout << (a + b) * h / 2 << endl;
| ^~~~
a.cc:4:35: error: expected '}' at end of input
4 | cout << (a + b) * h / 2 << endl;
| ^
a.cc:1:11: note: to match this '{'
1 | int main(){
| ^
|
s492283965
|
p03997
|
C
|
#include <stdio.h>
int main(void) {
int a;
int b;
int h;
int S;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);
S = ((a+b)*h)/2
printf("%d\n",S);
return 0;
}
|
main.c: In function 'main':
main.c:10:18: error: expected ';' before 'printf'
10 | S = ((a+b)*h)/2
| ^
| ;
11 | printf("%d\n",S);
| ~~~~~~
|
s953531664
|
p03997
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
cout<<(a+b)*c/2
}
|
a.cc: In function 'int main()':
a.cc:6:18: error: expected ';' before '}' token
6 | cout<<(a+b)*c/2
| ^
| ;
7 | }
| ~
|
s837118136
|
p03997
|
C
|
int a,b,h;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);
printf("%d",(a+b)*h/2);
|
main.c:3:15: error: expected declaration specifiers or '...' before string constant
3 | scanf("%d",&a);
| ^~~~
main.c:3:20: error: expected declaration specifiers or '...' before '&' token
3 | scanf("%d",&a);
| ^
main.c:4:15: error: expected declaration specifiers or '...' before string constant
4 | scanf("%d",&b);
| ^~~~
main.c:4:20: error: expected declaration specifiers or '...' before '&' token
4 | scanf("%d",&b);
| ^
main.c:5:15: error: expected declaration specifiers or '...' before string constant
5 | scanf("%d",&h);
| ^~~~
main.c:5:20: error: expected declaration specifiers or '...' before '&' token
5 | scanf("%d",&h);
| ^
main.c:6:16: error: expected declaration specifiers or '...' before string constant
6 | printf("%d",(a+b)*h/2);
| ^~~~
main.c:6:21: error: expected declaration specifiers or '...' before '(' token
6 | printf("%d",(a+b)*h/2);
| ^
|
s440394088
|
p03997
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,h;
cin >> a >> b >> h;
cout << (a+b)*h/2 << endl
}
|
a.cc: In function 'int main()':
a.cc:8:28: error: expected ';' before '}' token
8 | cout << (a+b)*h/2 << endl
| ^
| ;
9 | }
| ~
|
s964688499
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int N,K,X,Y;
cin >> X >> Y >>Z;
int aaa;
aaa=(X+Y)*Z/2;
cout <<aaa << endl;
}
|
a.cc: In function 'int main()':
a.cc:6:19: error: 'Z' was not declared in this scope
6 | cin >> X >> Y >>Z;
| ^
|
s957070927
|
p03997
|
C++
|
#include<iostream>
int main(){
int A, B, C;
cin>>A>>B>>C;
cout<<(A + B) * C / 2 << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin>>A>>B>>C;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:6:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
6 | 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:6:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
6 | 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)
| ^~~~
|
s150844442
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
using VS = vector<string>; using LL = long long;
using VI = vector<int>; using VVI = vector<VI>;
using PII = pair<int, int>; using PLL = pair<LL, LL>;
using VL = vector<LL>; using VVL = vector<VL>;
#define ALL(a) begin((a)),end((a))
#define RALL(a) (a).rbegin(), (a).rend()
#define SZ(a) int((a).size())
#define SORT(c) sort(ALL((c)))
#define RSORT(c) sort(RALL((c)))
#define UNIQ(c) (c).erase(unique(ALL((c))), end((c)))
#define FOR(i, s, e) for (int(i) = (s); (i) < (e); (i)++)
#define FORR(i, s, e) for (int(i) = (s); (i) > (e); (i)--)
//#pragma GCC optimize ("-O3")
#ifdef YANG33
#include "mydebug.hpp"
#else
#define DD(x)
#endif
const int INF = 1e9; const LL LINF = 1e16;
const LL MOD = 1000000007; const double PI = acos(-1.0);
int DX[8] = { 0, 0, 1, -1, 1, 1, -1, -1 }; int DY[8] = { 1, -1, 0, 0, 1, -1, 1, -1 };
/* ----- 2019/04/04 Problem: ABC 045 A / Link: http://abc045.contest.atcoder.jp/tasks/abc045_a ----- */
int main() {
cin.tie(0);
ios_base::sync_with_stdio(false);
LL a, b, c; cin >> a >> b >> c;
LL ans = (a + b)*h / 2;
cout << ans << "\n";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:35:26: error: 'h' was not declared in this scope
35 | LL ans = (a + b)*h / 2;
| ^
|
s413004091
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,h;
cin>>a>>b>>h;
cout<<(acb)*h/2<<endl;
}
|
a.cc: In function 'int main()':
a.cc:7:10: error: 'acb' was not declared in this scope
7 | cout<<(acb)*h/2<<endl;
| ^~~
|
s101555194
|
p03997
|
C++
|
#includea<bits/stdc++.h>
using namespace std;
int main(void){
int a,b,h;
cin>>a>>b>>h;
cout<<(a+b)*h/2<<endl;
return 0;
}
|
a.cc:1:2: error: invalid preprocessing directive #includea; did you mean #include?
1 | #includea<bits/stdc++.h>
| ^~~~~~~~
| include
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
6 | cin>>a>>b>>h;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | #includea<bits/stdc++.h>
a.cc:7:5: error: 'cout' was not declared in this scope
7 | cout<<(a+b)*h/2<<endl;
| ^~~~
a.cc:7:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:22: error: 'endl' was not declared in this scope
7 | cout<<(a+b)*h/2<<endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | #includea<bits/stdc++.h>
|
s797614956
|
p03997
|
C++
|
#includea<bits/stdc++.h>
using namespace std;
int main(void){
int a,b,h;
cin>>a>>b>>c;
cout<<(a+b)*h/2<<endl;
return 0;
}
|
a.cc:1:2: error: invalid preprocessing directive #includea; did you mean #include?
1 | #includea<bits/stdc++.h>
| ^~~~~~~~
| include
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
6 | cin>>a>>b>>c;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | #includea<bits/stdc++.h>
a.cc:6:16: error: 'c' was not declared in this scope
6 | cin>>a>>b>>c;
| ^
a.cc:7:5: error: 'cout' was not declared in this scope
7 | cout<<(a+b)*h/2<<endl;
| ^~~~
a.cc:7:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:22: error: 'endl' was not declared in this scope
7 | cout<<(a+b)*h/2<<endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | #includea<bits/stdc++.h>
|
s553755402
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int n, m,o;
cin >> n >> m >> o;
cout << ( n + m ) * O / 2;
}
|
a.cc: In function 'int main()':
a.cc:7:23: error: 'O' was not declared in this scope
7 | cout << ( n + m ) * O / 2;
| ^
|
s191772388
|
p03997
|
C++
|
#include <iostream>
using namespace std;
typedef long long unsigned int ll;
int main() {
int N、K,X,Y;
cin >> N;
cin >> K;
cin >> X;
cout << (N+K)*X/2<<endl;
return 0;
}
|
a.cc:7:7: error: extended character 、 is not valid in an identifier
7 | int N、K,X,Y;
| ^
a.cc: In function 'int main()':
a.cc:8:10: error: 'N' was not declared in this scope
8 | cin >> N;
| ^
a.cc:9:10: error: 'K' was not declared in this scope
9 | cin >> K;
| ^
|
s189405069
|
p03997
|
C
|
#include <iostream>
#include <queue>
using namespace std;
typedef long long ll;
#define repi(i, a, b) for(int i = int(a); i < int(b); ++i)
#define rep(i, n) repi(i, 0, n)
#define rerepi(i, a, b) for(int i = int(a)-1; i >= b; --i)
#define rerep(i, n) rerepi(i, n, 0)
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const long long INF = 1LL << 60;
// ここから開始だよ!
ll a, b, h;
int main() {
// 呪文エリア
cin.tie(0);
ios::sync_with_stdio(false);
// 詠唱完了
cin >> a;
cin >> b;
cin >> h;
cout << (a+b) * h /2 << endl;
return 0;
}
|
main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s625418988
|
p03997
|
C
|
#include "stdafx.h"
#include <iostream>
#include <queue>
using namespace std;
typedef long long ll;
#define repi(i, a, b) for(int i = int(a); i < int(b); ++i)
#define rep(i, n) repi(i, 0, n)
#define rerepi(i, a, b) for(int i = int(a)-1; i >= b; --i)
#define rerep(i, n) rerepi(i, n, 0)
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const long long INF = 1LL << 60;
// ここから開始だよ!
ll a, b, h;
int main() {
// 呪文エリア
cin.tie(0);
ios::sync_with_stdio(false);
// 詠唱完了
cin >> a;
cin >> b;
cin >> h;
cout << (a+b) * h /2 << endl;
return 0;
}
|
main.c:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s943895181
|
p03997
|
C++
|
#include <iostream>
#include <vector>
#include <string>
#include <cstdlib>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <stack>
#include <math.h>
#define rep(i, n) for(int i = 0; i < (n); ++i)
using namespace std;
template<class T> inline bool chmax(T& a, T b){ if(a < b) { a=b; return 1; }return 0;}
template<class T> inline bool chmin(T& a, T b){ if(a > b) { a=b; return 1; }return 0;}
const long long INF = 1LL << 60;
//bucket1
// bool ch[10] = {0};
// bool check(int n){
// while(n!=0){
// if(ch[n%10]) return false;
// n /= 10;
// }
// return true;
// }
// --------write my code!!!!!----------//
int main(){
int a,b,h; cin >> a >> b >> c;
cout << (a+b)*c/2 << endl;
}
|
a.cc: In function 'int main()':
a.cc:35:33: error: 'c' was not declared in this scope
35 | int a,b,h; cin >> a >> b >> c;
| ^
|
s782557525
|
p03997
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a,b,h;
cin>>a>b>>h;
cout<<(a+b)*h/2<<endl;
}
|
a.cc: In function 'int main()':
a.cc:6:9: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
6 | cin>>a>b>>h;
| ~~~~~~^~~~~
| | |
| | int
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
a.cc:6:9: note: candidate: 'operator>(int, int)' (built-in)
6 | cin>>a>b>>h;
| ~~~~~~^~~~~
a.cc:6:9: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/string:48,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/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:6:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
6 | 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:6:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
6 | 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:6:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
6 | 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:6:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
6 | cin>>a>b>>h;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string: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:6:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>'
6 | cin>>a>b>>h;
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/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:6:13: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
6 | 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:6:13: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
6 | 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:6:13: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
6 | 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:6:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
6 | cin>>a>b>>h;
| ^
/usr/include/c++/14/bits/basic_string.h:3929:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3929 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3929:5: note: template argument deduction/substitution failed:
a.cc:6:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
6 | cin>>a>b>>h;
| ^
/usr/include/c++/14/bits/basic_string.h:3942:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3942 | operator>(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3942:5: note: template argument deduction/substitution failed:
a.cc:6:13: note: mismatched types 'const _CharT*' and 'std::basic_istream<char>'
6 | cin>>a>b>>h;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2619:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator>(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2619 | operator>(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2619:5: note: template argument deduction/substitution failed:
a.cc:6:13: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::tuple<_UTypes ...>'
6 | cin>>a>b>>h;
| ^
|
s874664981
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a, b, h;
cin >> a >> b >> c;
cout << (a + b) * c / 2 << endl;
}
|
a.cc: In function 'int main()':
a.cc:6:20: error: 'c' was not declared in this scope
6 | cin >> a >> b >> c;
| ^
|
s788218936
|
p03997
|
C++
|
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
System.out.println((a+b)*h/2);
}
}
|
a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main{
| ^~~~~~
|
s117138341
|
p03997
|
C++
|
#include<iostream>
#include<cmath>
#include<vector>
#include<set>
#include<algorithm>
#include<tuple>
#include<utility>
#include<cctype>
#include<climits>
#include<map>
#include<queue>
#include<functional>
#include <ios>
#include <iomanip>
using namespace std;
template<class T> void chmax(T& a, T b) {if(a < b){a=b;}}
template<class T> void chmin(T& a, T b) {if(a > b){a=b;}}
#define REP(i,a,n) for(int i=a;i<n;++i)
#define RUP(a,b) ((a+b-1)/(b))
#define ENT "\n"
#define REV(v) reverse(v.begin(),v.end())
#define SRTV(v) sort(v.begin(),v.end())
#define SRTAG(a,n) sort(a,a+n,greater<>())
#define MOD 1000000007
typedef long long ll;
typedef tuple<int,int,bool> Tb;
typedef tuple<ll,ll,ll> Tl;
int atcoder(){
//入力
ll a,b,c;
cin >> n >> k;
cout << (a+b)*c/2 << ENT;
return 0;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
atcoder();
return 0;
}
|
a.cc: In function 'int atcoder()':
a.cc:37:12: error: 'n' was not declared in this scope
37 | cin >> n >> k;
| ^
a.cc:37:17: error: 'k' was not declared in this scope
37 | cin >> n >> k;
| ^
|
s726358318
|
p03997
|
C++
|
#include<stream>
#include<stdio.h>
using namespace std;
int main(){
int a, b, h;
cin >> a >> b >> h;
cout << (a + b) * h / 2 << endl;
}
|
a.cc:1:9: fatal error: stream: No such file or directory
1 | #include<stream>
| ^~~~~~~~
compilation terminated.
|
s401800563
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin >> a >> b >> c;
cout << (a+b)*h/2 << endl;
}
|
a.cc: In function 'int main()':
a.cc:7:17: error: 'h' was not declared in this scope
7 | cout << (a+b)*h/2 << endl;
| ^
|
s233444830
|
p03997
|
C
|
main(a,b,c){scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*h/2);}
|
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(a,b,c){scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*h/2);}
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'c' defaults to 'int' [-Wimplicit-int]
main.c:1:13: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | main(a,b,c){scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*h/2);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | main(a,b,c){scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*h/2);}
main.c:1:13: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | main(a,b,c){scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*h/2);}
| ^~~~~
main.c:1:13: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:38: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | main(a,b,c){scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*h/2);}
| ^~~~~~
main.c:1:38: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:38: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:38: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:56: error: 'h' undeclared (first use in this function)
1 | main(a,b,c){scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*h/2);}
| ^
main.c:1:56: note: each undeclared identifier is reported only once for each function it appears in
|
s179859926
|
p03997
|
C
|
n = int(input())
h = list(map(int,input().split()))
res = 0
pre = 0
h.insert(0,0)
for i in range(n):
if h[i+1]>h[i]:
res += h[i+1]-h[i]
else:
print(res)
|
main.c:1:1: warning: data definition has no type or storage class
1 | n = int(input())
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:5: error: expected expression before 'int'
1 | n = int(input())
| ^~~
|
s705760640
|
p03997
|
C++
|
#include <iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
cout<<(a+b)*h/2<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:15: error: 'h' was not declared in this scope
7 | cout<<(a+b)*h/2<<endl;
| ^
|
s769353016
|
p03997
|
C++
|
include <iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
cout<<(a+b)*h/2<<endl;
return 0;
}
|
a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin>>a>>b>>c;
| ^~~
a.cc:7:3: error: 'cout' was not declared in this scope
7 | cout<<(a+b)*h/2<<endl;
| ^~~~
a.cc:7:15: error: 'h' was not declared in this scope
7 | cout<<(a+b)*h/2<<endl;
| ^
a.cc:7:20: error: 'endl' was not declared in this scope
7 | cout<<(a+b)*h/2<<endl;
| ^~~~
|
s447761336
|
p03997
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a, b, h;
cin a >> b >> h;
cout << (a+b)*h/2 << endl;
}
|
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'a'
6 | cin a >> b >> h;
| ^~
| ;
|
s632089071
|
p03997
|
C++
|
#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<string>
#include<vector>
using namespace std;
int main(void){
ios::sync_with_stdio(false); cin.tie(0);
int a,b,c;
cin>>a>>b>>c;
cout<<(a+b)*h/2<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:14:21: error: 'h' was not declared in this scope
14 | cout<<(a+b)*h/2<<endl;
| ^
|
s624718772
|
p03997
|
C
|
#include<stdio.h>
int main(){
int a,b,h;
scanf("%d\n%d\n%d",&a, &b, &c);
printf("%d\n",(a+b)*h/2);
return 0;
}
|
main.c: In function 'main':
main.c:6:33: error: 'c' undeclared (first use in this function)
6 | scanf("%d\n%d\n%d",&a, &b, &c);
| ^
main.c:6:33: note: each undeclared identifier is reported only once for each function it appears in
|
s287102465
|
p03997
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a,b;
cin >>a>>b;
cout<<(a+b)*h/2<<endl;
}
|
a.cc: In function 'int main()':
a.cc:6:15: error: 'h' was not declared in this scope
6 | cout<<(a+b)*h/2<<endl;
| ^
|
s098976518
|
p03997
|
C
|
main(a,b,c){scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*h/2);}
|
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(a,b,c){scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*h/2);}
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'c' defaults to 'int' [-Wimplicit-int]
main.c:1:13: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | main(a,b,c){scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*h/2);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | main(a,b,c){scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*h/2);}
main.c:1:13: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | main(a,b,c){scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*h/2);}
| ^~~~~
main.c:1:13: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:38: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | main(a,b,c){scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*h/2);}
| ^~~~~~
main.c:1:38: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:38: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:38: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:56: error: 'h' undeclared (first use in this function)
1 | main(a,b,c){scanf("%d%d%d",&a,&b,&c);printf("%d",(a+b)*h/2);}
| ^
main.c:1:56: note: each undeclared identifier is reported only once for each function it appears in
|
s107533447
|
p03997
|
C++
|
#include<iostream>
#include<string>
#include<vector>
#include<iomanip>
#include<algorithm>
#include<queue>
#include<stack>
#include<map>
using namespace std;
#define ll long long
int main(){
int a,b,c,;
cin >> a >> b >> c;
cout << (a+b)*c/2;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:15: error: expected unqualified-id before ';' token
12 | int a,b,c,;
| ^
|
s067840018
|
p03997
|
C++
|
#include<iostream>
using namespace std;
int main(void)
{
int a,b,h;
cin << a << b << h;
cout >> (a + b) * h / 2;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
7 | cin << a << b << h;
| ~~~ ^~ ~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:7:7: note: candidate: 'operator<<(int, int)' (built-in)
7 | cin << a << b << h;
| ~~~~^~~~
a.cc:7:7: 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/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a << b << h;
| ^
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a << b << h;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:7:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte'
7 | cin << a << b << h;
| ^~~
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a << b << h;
| ^
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a << b << h;
| ^
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a << b << h;
| ^
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a << b << h;
| ^
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a << b << h;
| ^
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a << b << h;
| ^
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a << b << h;
| ^
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a << b << h;
| ^
/usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)'
671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a << b << h;
| ^
/usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)'
684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a << b << h;
| ^
/usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)'
689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a << b << h;
| ^
/usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)'
810 | operator<<(_Ostream&& __os, const _Tp& __x)
| ^~~~~~~~
/usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = int]':
a.cc:7:10: required from here
7 | cin << a << b << h;
| ^
/usr/include/c++/14/ostream:810:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
810 | operator<<(_Ostream&& __os, const _Tp& __x)
| ^~~~~~~~
a.cc:8:8: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
8 | cout >> (a + b) * h / 2;
| ~~~~ ^~ ~~~~~~~~~~~~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:8:8: note: candidate: 'operator>>(int, int)' (built-in)
8 | cout >> (a + b) * h / 2;
| ~~~~~^~~~~~~~~~~~~~~~~~
a.cc:8:8: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} t
|
s008130883
|
p03997
|
C++
|
#include<iostream>
int main(void)
{
int a,b,h;
cin >> a >> b >> h;
cout << (a + b) * h / 2;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> a >> b >> h;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
7 | cout << (a + b) * h / 2;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s802662916
|
p03997
|
C++
|
#include<iostream>
int main(void)
{
int a,b,h;
cin << a << b << h;
cout >> (a + b) * h / 2;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin << a << b << h;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
7 | cout >> (a + b) * h / 2;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s929950009
|
p03997
|
Java
|
import java.util.*;
public class Main{
public static void main(string[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
System.out.println((a+b)*h/2);
}
}
|
Main.java:3: error: cannot find symbol
public static void main(string[] args){
^
symbol: class string
location: class Main
1 error
|
s489340995
|
p03997
|
C
|
main(int a,int b,int h){
scanf("%d %d %d",&a,&b,&c);
printf("%d\n", (a + b) * h / 2);
}
|
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(int a,int b,int h){
| ^~~~
main.c: In function 'main':
main.c:2:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
2 | scanf("%d %d %d",&a,&b,&c);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | main(int a,int b,int h){
main.c:2:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
2 | scanf("%d %d %d",&a,&b,&c);
| ^~~~~
main.c:2:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:2:33: error: 'c' undeclared (first use in this function)
2 | scanf("%d %d %d",&a,&b,&c);
| ^
main.c:2:33: note: each undeclared identifier is reported only once for each function it appears in
main.c:3:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
3 | printf("%d\n", (a + b) * h / 2);
| ^~~~~~
main.c:3:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:3:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:3:9: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s649140381
|
p03997
|
C
|
main(a,b,h){
scanf("%d %d %d",&a,&b,&c);
printf("%d\n", (a + b) * h / 2);
}
|
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(a,b,h){
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'h' defaults to 'int' [-Wimplicit-int]
main.c:2:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
2 | scanf("%d %d %d",&a,&b,&c);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | main(a,b,h){
main.c:2:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
2 | scanf("%d %d %d",&a,&b,&c);
| ^~~~~
main.c:2:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:2:33: error: 'c' undeclared (first use in this function)
2 | scanf("%d %d %d",&a,&b,&c);
| ^
main.c:2:33: note: each undeclared identifier is reported only once for each function it appears in
main.c:3:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
3 | printf("%d\n", (a + b) * h / 2);
| ^~~~~~
main.c:3:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:3:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:3:9: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s805577620
|
p03997
|
C
|
#include <iostream>
using namespace std;
int main()
{
double a,b,h;
double s;
cin>>a>>b>>h;
s=(a+b)/2*h;
cout<<s;
return 0;
}
|
main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.