submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s215283087
p03697
C++
#include <iostream> #include <cstdio> using namespace std; int main() { int a, b; cin >> a >> b; cout << ((a + b >= 10) ? "error" : a + b) << endl; }
a.cc: In function 'int main()': a.cc:8:26: error: operands to '?:' have different types 'const char*' and 'int' 8 | cout << ((a + b >= 10) ? "error" : a + b) << endl; | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
s252061614
p03697
C++
#include <iostream> #include <cstdio> using namespace std; int main() { int a, b; cin >> a >> b; cout << (a + b >= 10 ? "error" : a + b) << endl; }
a.cc: In function 'int main()': a.cc:8:24: error: operands to '?:' have different types 'const char*' and 'int' 8 | cout << (a + b >= 10 ? "error" : a + b) << endl; | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
s014745866
p03697
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; cin >> a >> b; if(a+b<10){ cout << a+b; }else{ cout <<error; } return 0; }
a.cc: In function 'int main()': a.cc:17:14: error: 'error' was not declared in this scope; did you mean 'perror'? 17 | cout <<error; | ^~~~~ | perror
s308651722
p03697
C++
#include<iostream> #include<vector> #include<algorithm> #include<string.h> #include<complex> using namespace std; typedef long long int llint; int main(){ int x, y; cin >> x >> y; if (x + y >= 10){ cout << "error" << endl; } else{ cout << x + y < endl; } return 0; }
a.cc: In function 'int main()': a.cc:15:31: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 15 | cout << x + y < endl; | ~~~~~~~~~~~~~~^~~~~~ 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:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:15:33: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 15 | cout << x + y < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:15:33: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 15 | cout << x + y < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:15:33: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 15 | cout << x + y < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:15:33: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 15 | cout << x + y < endl; | ^~~~ 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:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:15:33: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 15 | cout << x + y < endl; | ^~~~ 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:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:15:33: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 15 | cout << x + y < endl; | ^~~~ /usr/include/c++/14/string_view:680: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> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:15:33: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 15 | cout << x + y < endl; | ^~~~ /usr/include/c++/14/string_view:688: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>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:15:33: note: couldn't deduce template parameter '_CharT' 15 | cout << x + y < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874: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>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:15:33: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 15 | cout << x + y < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed: a.cc:15:33: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 15 | cout << x + y < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3901 | operator<(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed: a.cc:15:33: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 15 | cout << x + y < endl; | ^~~~ 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:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:15:33: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 15 | cout << x + y < endl; | ^~~~ In file included from /usr/include/c++/14/vector:66, from a.cc:2: /usr/include/c++/14/bits/stl_vector.h:2089:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)' 2089 | operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:2089:5: note: template argument deduction/substitution failed: a.cc:15:33: note: 'std::basic_ostream<char>' is not derived from 'const std::vector<_Tp, _Alloc>' 15 | cout << x + y < endl; | ^~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ^~~~~~~~ /usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_code&' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)' 507 | operator<(const error_condition& __lhs, | ^~~~~~~~ /usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_condition&' 507 | operator<(const error_condition& __lhs, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
s802514754
p03697
C
#include <stdio.h> int main(void){ int a,b; scanf(%d%d,&a,&b); if(a+b>=10) printf("error"); else printf("%d",a+b); return 0; }
main.c: In function 'main': main.c:4:11: error: expected expression before '%' token 4 | scanf(%d%d,&a,&b); | ^
s301508611
p03697
C++
A,B = map(int,input().split()) if A+B >= 10: print("error") else: print(A+B)
a.cc:1:1: error: 'A' does not name a type 1 | A,B = map(int,input().split()) | ^
s842338905
p03697
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <algorithm> #include <string> #include <sstream> #include <complex> #include <vector> #include <list> #include <queue> #include <deque> #include <stack> #include <map> #include <set> #include <array> #include <tuple> #include <random> using namespace std; typedef long long int ll; #define _overload3(_1, _2, _3, name, ...) name #define _rep(i, n) repi(i, 0, n) #define repi(i, a, b) for(int i = int(a); i < int(b); i++) #define rep(...) _overload3(__VA_ARGS__, repi, _rep,)(__VA_ARGS__) #define all(x) (x).begin(), (x).end() #define inf 10000000000 int main(){ cin.tie(0); ios::sync_with_stdio(false); ll a, b; cin >> a >> b; cout << ((a + b < 10) ? (string)(a + b) : "error") << endl; }
a.cc: In function 'int main()': a.cc:38:43: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(ll)' 38 | cout << ((a + b < 10) ? (string)(a + b) : "error") << endl; | ^ In file included 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/bits/basic_string.h:800:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 800 | basic_string(const _Tp& __t, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:800:9: note: template argument deduction/substitution failed: In file included from /usr/include/c++/14/bits/move.h:37, from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41: /usr/include/c++/14/type_traits: In substitution of 'template<bool _Cond, class _Tp> using std::enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]': /usr/include/c++/14/bits/basic_string.h:149:8: required by substitution of 'template<class _CharT, class _Traits, class _Alloc> template<class _Tp, class _Res> using std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv = std::enable_if_t<((bool)std::__and_<std::is_convertible<const _Tp&, std::basic_string_view<_CharT, _Traits> >, std::__not_<std::is_convertible<const _Tp*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>*> >, std::__not_<std::is_convertible<const _Tp&, const _CharT*> > >::value), _Res> [with _Tp = long long int; _Res = void; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 149 | using _If_sv = enable_if_t< | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:797:30: required from here 797 | template<typename _Tp, typename = _If_sv<_Tp, void>> | ^~~~~~~~ /usr/include/c++/14/type_traits:2711:11: error: no type named 'type' in 'struct std::enable_if<false, void>' 2711 | using enable_if_t = typename enable_if<_Cond, _Tp>::type; | ^~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:788:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, size_type, size_type, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 788 | basic_string(const _Tp& __t, size_type __pos, size_type __n, | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:788:9: note: candidate expects 3 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:765:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator, _InputIterator, const _Alloc&) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 765 | basic_string(_InputIterator __beg, _InputIterator __end, | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:765:9: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:669:7: note: candidate: 'template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(size_type, _CharT, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 669 | basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:669:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:646:7: note: candidate: 'template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 646 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:646:7: note: template argument deduction/substitution failed: a.cc:38:40: note: cannot convert '(a + b)' (type 'll' {aka 'long long int'}) to type 'const char*' 38 | cout << ((a + b < 10) ? (string)(a + b) : "error") << endl; | ~~~^~~~ /usr/include/c++/14/bits/basic_string.h:721:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 721 | basic_string(basic_string&& __str, const _Alloc& __a) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:721:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:716:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 716 | basic_string(const basic_string& __str, const _Alloc& __a) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:716:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:711:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::initializer_list<_Tp>, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 711 | basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:711:45: note: no known conversion for argument 1 from 'll' {aka 'long long int'} to 'std::initializer_list<char>' 711 | basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc()) | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/basic_string.h:682:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 682 | basic_string(basic_string&& __str) noexcept | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:682:35: note: no known conversion for argument 1 from 'll' {aka 'long long int'} to 'std::__cxx11::basic_string<char>&&' 682 | basic_string(basic_string&& __str) noexcept | ~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:624:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 624 | basic_string(const _CharT* __s, size_type __n, | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:624:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:604:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 604 | basic_string(const basic_string& __str, size_type __pos, | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:604:7: note: candidate expects 4 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:586:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 586 | basic_string(const basic_string& __str, size_type __pos, | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:586:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:569:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 569 | basic_string(const basic_string& __str, size_type __pos, | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:569:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:552:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 552 | basic_string(const basic_string& __str) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:552:40: note: no known conversion for argument 1 from 'll' {aka 'long long int'} to 'const std::__cxx11::basic_string<char>&' 552 | basic_string(const basic_string& __str) | ~~~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:540:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 540 | basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT | ^~~~~~~~~~~~ /usr/include/c++/14/bits/b
s120443194
p03697
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <algorithm> #include <string> #include <sstream> #include <complex> #include <vector> #include <list> #include <queue> #include <deque> #include <stack> #include <map> #include <set> #include <array> #include <tuple> #include <random> using namespace std; typedef long long int ll; #define _overload3(_1, _2, _3, name, ...) name #define _rep(i, n) repi(i, 0, n) #define repi(i, a, b) for(int i = int(a); i < int(b); i++) #define rep(...) _overload3(__VA_ARGS__, repi, _rep,)(__VA_ARGS__) #define all(x) (x).begin(), (x).end() #define inf 10000000000 int main(){ cin.tie(0); ios::sync_with_stdio(false); ll a, b; cin >> a >> b; cout << ((a + b < 10) ? (a + b) : "error") << endl; }
a.cc: In function 'int main()': a.cc:38:27: error: operands to '?:' have different types 'll' {aka 'long long int'} and 'const char*' 38 | cout << ((a + b < 10) ? (a + b) : "error") << endl; | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
s200883741
p03697
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <algorithm> #include <string> #include <sstream> #include <complex> #include <vector> #include <list> #include <queue> #include <deque> #include <stack> #include <map> #include <set> #include <array> #include <tuple> #include <random> using namespace std; typedef long long int ll; #define _overload3(_1, _2, _3, name, ...) name #define _rep(i, n) repi(i, 0, n) #define repi(i, a, b) for(int i = int(a); i < int(b); i++) #define rep(...) _overload3(__VA_ARGS__, repi, _rep,)(__VA_ARGS__) #define all(x) (x).begin(), (x).end() #define inf 10000000000 int main(){ cin.tie(0); ios::sync_with_stdio(false); ll a, b; cin >> a >> b; cout << ((a + b < 10) ? a + b : "error") << endl; }
a.cc: In function 'int main()': a.cc:38:27: error: operands to '?:' have different types 'll' {aka 'long long int'} and 'const char*' 38 | cout << ((a + b < 10) ? a + b : "error") << endl; | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
s607211140
p03697
C++
#include <iostream> using namespace std; int main(void){ int a,b; cin >> a >> b; int c = a + b; cout << (c<10 ? c : "error") << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:17: error: operands to '?:' have different types 'int' and 'const char*' 11 | cout << (c<10 ? c : "error") << endl; | ~~~~~^~~~~~~~~~~~~
s043259979
p03697
C++
#include <iostream> using namespace std; int main(void){ int a,b; cin >> a >> b; c = a + b; cout << (c<10 ? c : "error") << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:3: error: 'c' was not declared in this scope 10 | c = a + b; | ^
s864679996
p03697
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<(a+b>9?"error":a+b); }
a.cc: In function 'int main()': a.cc:6:15: error: operands to '?:' have different types 'const char*' and 'int' 6 | cout<<(a+b>9?"error":a+b); | ~~~~~^~~~~~~~~~~~
s637610840
p03697
C++
#include<bits/std++.h> using namespace std; int main(void){ int x, y; cin >> x >> y; if((x+y)>=10){ cout << "error\n"; }else{ cout << x + y << endl; } }
a.cc:1:9: fatal error: bits/std++.h: No such file or directory 1 | #include<bits/std++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s085464534
p03697
C++
v
a.cc:1:1: error: 'v' does not name a type 1 | v | ^
s997729504
p03697
C
#include<Stdio.h> int main(){ int a, b; scanf("%d %d", &a, &b); if(a + b < 10){ printf("%d", a + b); } else { printf("error\n"); } return 0; }
main.c:1:9: fatal error: Stdio.h: No such file or directory 1 | #include<Stdio.h> | ^~~~~~~~~ compilation terminated.
s279264825
p03697
C
#include<Stdio.h> int main(){ int a, b; scanf("%d %d", &a, &b); if(a + b < 10){ printf("%d", a + b); } else { printf("error\n"); } return 0; }
main.c:1:9: fatal error: Stdio.h: No such file or directory 1 | #include<Stdio.h> | ^~~~~~~~~ compilation terminated.
s236122195
p03697
C
#include<Stdio.h> int main(){ int a, b; if(a + b < 10){ printf("%d", a + b); } else { printf("error\n"); } return 0; }
main.c:1:9: fatal error: Stdio.h: No such file or directory 1 | #include<Stdio.h> | ^~~~~~~~~ compilation terminated.
s677054170
p03697
C++
#include<iostream> #include<string> using namespace std; int main(){ int a,b,c; cin >> a >> b; if(c =a+b >= 10) cout << "error" << endl; else count << c << endl; }
a.cc: In function 'int main()': a.cc:8:8: error: 'count' was not declared in this scope 8 | else count << c << endl; | ^~~~~
s236069454
p03697
C++
#include<iostream> #include<string> using namespace std; int main(){ int a,b,c; cin >> a >> b; if(c =a+b >= 10) cout << “error” << endl; else count << c << endl; }
a.cc:7:28: error: extended character “ is not valid in an identifier 7 | if(c =a+b >= 10) cout << “error” << endl; | ^ a.cc:7:28: error: extended character ” is not valid in an identifier a.cc: In function 'int main()': a.cc:7:28: error: '\U0000201cerror\U0000201d' was not declared in this scope 7 | if(c =a+b >= 10) cout << “error” << endl; | ^~~~~~~ a.cc:8:8: error: 'count' was not declared in this scope 8 | else count << c << endl; | ^~~~~
s650262665
p03697
C++
#include<iostream> #include<string> using namespace std; int main(){ int a,b; cin >> a >> b; cout << (a+b >=10? "error":a+b) << endl; }
a.cc: In function 'int main()': a.cc:7:20: error: operands to '?:' have different types 'const char*' and 'int' 7 | cout << (a+b >=10? "error":a+b) << endl; | ~~~~~~~~^~~~~~~~~~~~~
s530397673
p03697
C++
#include<iostream> using namespace std; int main(){ int a,b; cin >> a >> b; cout << (a+b >=10? "error" : a+b) << endl; }
a.cc: In function 'int main()': a.cc:6:20: error: operands to '?:' have different types 'const char*' and 'int' 6 | cout << (a+b >=10? "error" : a+b) << endl; | ~~~~~~~~^~~~~~~~~~~~~~~
s263927189
p03697
C++
#include<iostream> using namespace std; int main(){ int a,b; cin >> a >> b; cout << (a+b >=10?"error":a+b) << endl; }
a.cc: In function 'int main()': a.cc:6:20: error: operands to '?:' have different types 'const char*' and 'int' 6 | cout << (a+b >=10?"error":a+b) << endl; | ~~~~~~~~^~~~~~~~~~~~
s656018211
p03697
C++
#include "bits/stdc++.h" using namespace std; int main(){ int A,B; cin>>A>>B; cout<<(A+B>=10?"error":A+B)<<endl; }
a.cc: In function 'int main()': a.cc:6:19: error: operands to '?:' have different types 'const char*' and 'int' 6 | cout<<(A+B>=10?"error":A+B)<<endl; | ~~~~~~~^~~~~~~~~~~~
s151142988
p03697
C++
#include <bits/std++.h> using namespace std; int main(){ int a,b; cin>>a>>b; if((a+b)>=10) cout<<"error"<<endl; else cout<<(a+b)<<endl; return 0; }
a.cc:1:10: fatal error: bits/std++.h: No such file or directory 1 | #include <bits/std++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s904209159
p03697
C++
#include <bits/std++.h> using namespace std; int main(){ int a,b; cin>>a>>b; if((a+b)>=10) cout>>"error">>endl; else cout>>(a+b)>>endl; return 0; }
a.cc:1:10: fatal error: bits/std++.h: No such file or directory 1 | #include <bits/std++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s257534296
p03697
C++
#include <iostream> #include <algorithm> #include <cmath> #include <limits> #include <vector> #include <cstdio> #include <bits/stdc++.h> #include <set> #include <map> #include <stdio.h> #include <string.h> #include <stack> #include <queue> #include <deque> #include <numeric> #include<bits/stdc++.h> #include <utility> #define ALL(obj) (obj).begin(), (obj).end() #define FOR(i,a,b) for(int i = (a); i < (b); i++) #define RFOR(i,a,b) for(int i = (a); (b) <= i; i--) #define REP(i,n) for(int i = 0; i < (n); i++) #define RREP(i,n) for(int i = n; n <= i; i--) #define ABS(a) ((a < 0) ? ((-1)*(a)) : (a)) #define elif else if #define MOD 1000000007 #define INF (1<<29) using namespace std; using ll = long long; map <int ,int> mpa,mpb; typedef pair<ll, ll> P; priority_queue<P, vector<P>, greater<P>> pque; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); int A, B; cin >> A >> B; cout << (A+B>=10?"error":A+B) << endl; return 0; }
a.cc: In function 'int main()': a.cc:40:19: error: operands to '?:' have different types 'const char*' and 'int' 40 | cout << (A+B>=10?"error":A+B) << endl; | ~~~~~~~^~~~~~~~~~~~
s994796290
p03697
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include <string> #include <sstream> #include <complex> #include <vector> #include <list> #include <queue> #include <deque> #include <stack> #include <map> #include <set> using namespace std; #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) #define REP(i, n) for (int i = 0; i < (n); i++) int main() { int A, B; cin >> A >> B; if (A + B >= 10) cout << "error" << endl; else cout << A + B << endl; a return 0; }
a.cc: In function 'int main()': a.cc:29:3: error: 'a' was not declared in this scope 29 | a | ^
s738871806
p03697
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<queue> #include<map> #include<math.h> #include<iomanip> #include<set> #include <numeric> #include<cstring> #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i >= 0;i--) #define FOR(i, m, n) for(int i = m;i < n;i++) #define FORR(i, m, n) for(int i = m;i >= n;i--) #define SORT(v, n) sort(v, v+n); #define VSORT(v) sort(v.begin(), v.end()); #define REVERSE(v,n) reverse(v,v+n); #define VREVERSE(v) reverse(v.begin(), v.end()); #define ll long long #define pb(a) push_back(a) #define INF 999999999 #define m0(x) memset(x,0,sizeof(x)) #define fill(x,y) memset(x,y,sizeof(x)) using namespace std; int dy[4] = { 0,0,1,-1 }; int dx[4] = { 1,-1,0,0 }; int dxx[8] = { 0,0,1,1,1,-1,-1,-1 }; int dyy[8] = { 1,-1,0,1,-1,0,1,-1 }; ll m = 1000000007; const int MOD = 1000000007; ll gcd(ll x, ll y) { ll m = max(x, y), n = min(x, y); if (m%n == 0)return n; else return gcd(m%n, n); } ll lcm(ll x, ll y) { return x / gcd(x, y)*y; } ll myPow(ll x, ll n, ll m) { if (n == 0) return 1; if (n % 2 == 0) return myPow(x * x % m, n / 2, m); else return x * myPow(x, n - 1, m) % m; } long long nCr(int n, int r) { if (r > n / 2) r = n - r; // because C(n, r) == C(n, n - r) long long ans = 1; int i; for (i = 1; i <= r; i++) { ans *= n - r + i; ans /= i; } return ans; } int main() { int A, B; cin >> A >> B; if (A + B >= 10)cout << "error" << Endl; else cout << A + B << endl; }
a.cc: In function 'int main()': a.cc:77:44: error: 'Endl' was not declared in this scope 77 | if (A + B >= 10)cout << "error" << Endl; | ^~~~
s259731805
p03697
C++
#include <bits/stdc++.h> using namespace std; #define dump(x) cout << (x) << endl typedef long long ll; typedef pair<int, int> pi; typedef vector<int> V; int main() { int a, b; cin >> a >> b; dump(a+b >= 10 ? "error" : a+b); return 0; }
a.cc: In function 'int main()': a.cc:11:18: error: operands to '?:' have different types 'const char*' and 'int' 11 | dump(a+b >= 10 ? "error" : a+b); | ~~~~~~~~~~^~~~~~~~~~~~~~~ a.cc:3:26: note: in definition of macro 'dump' 3 | #define dump(x) cout << (x) << endl | ^
s127515750
p03697
C++
#include <bits/stdc++.h> using namespace std; #define dump(x) cout << (x) << endl typedef long long ll; typedef pair<int, int> pi; typedef vector<int> V; int main() { int a, b; cin >> a >> b; dump(a+b >= 10 ? "error" : a+b) return 0; }
a.cc: In function 'int main()': a.cc:11:18: error: operands to '?:' have different types 'const char*' and 'int' 11 | dump(a+b >= 10 ? "error" : a+b) | ~~~~~~~~~~^~~~~~~~~~~~~~~ a.cc:3:26: note: in definition of macro 'dump' 3 | #define dump(x) cout << (x) << endl | ^
s655402586
p03697
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; set<char> st; for(int i=0;i<s.size();i++){ st.insert(s[i]); } if(st.size() == s.size()) cout<"Yes"; else cout<<"No"; return 0; }
a.cc: In function 'int main()': a.cc:11:40: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]') 11 | if(st.size() == s.size()) cout<"Yes"; | ~~~~^~~~~~ | | | | | const char [4] | std::ostream {aka std::basic_ostream<char>} 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:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed: a.cc:11:41: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 11 | if(st.size() == s.size()) cout<"Yes"; | ^~~~~ /usr/include/c++/14/bits/regex.h:1224: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>&)' 1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed: a.cc:11:41: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 11 | if(st.size() == s.size()) cout<"Yes"; | ^~~~~ /usr/include/c++/14/bits/regex.h:1317: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>&)' 1317 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed: a.cc:11:41: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 11 | if(st.size() == s.size()) cout<"Yes"; | ^~~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed: a.cc:11:41: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'const char [4]' 11 | if(st.size() == s.size()) cout<"Yes"; | ^~~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1485 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed: a.cc:11:41: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 11 | if(st.size() == s.size()) cout<"Yes"; | ^~~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed: a.cc:11:41: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'const char [4]' 11 | if(st.size() == s.size()) cout<"Yes"; | ^~~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1660 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed: a.cc:11:41: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 11 | if(st.size() == s.size()) cout<"Yes"; | ^~~~~ 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:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:11:41: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>' 11 | if(st.size() == s.size()) cout<"Yes"; | ^~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:11:41: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 11 | if(st.size() == s.size()) cout<"Yes"; | ^~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:11:41: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 11 | if(st.size() == s.size()) cout<"Yes"; | ^~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:11:41: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 11 | if(st.size() == s.size()) cout<"Yes"; | ^~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:11:41: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 11 | if(st.size() == s.size()) cout<"Yes"; | ^~~~~ 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:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:11:41: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 11 | if(st.size() == s.size()) cout<"Yes"; | ^~~~~ /usr/include/c++/14/string_view:680: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> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:11:41: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 11 | if(st.size() == s.size()) cout<"Yes"; | ^~~~~ /usr/include/c++/14/string_view:688: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>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument dedu
s136550143
p03697
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <set> #include <stack> #include <deque> #include <cmath> #include <map> using ll = long long; using namespace std; int main() { int a, b; cin >> a >> b; cout << (a+b >= 10 ? "error" : a+b ) << endl; }
a.cc: In function 'int main()': a.cc:16:22: error: operands to '?:' have different types 'const char*' and 'int' 16 | cout << (a+b >= 10 ? "error" : a+b ) << endl; | ~~~~~~~~~~^~~~~~~~~~~~~~~
s541050442
p03697
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <set> #include <stack> #include <deque> #include <cmath> #include <map> using ll = long long; using namespace std; int main() { int a, b; cin >> a >> b; cout << (a+b >= 10 ) ? "error" : a+b << endl; }
a.cc: In function 'int main()': a.cc:16:40: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 16 | cout << (a+b >= 10 ) ? "error" : a+b << endl; | ~~~~^~~~~~~
s802823644
p03697
C++
#include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <iostream> #include <bitset> #include <deque> #include <list> #include <map> #include <set> #include <queue> #include <stack> #include <vector> #include <algorithm> #include <iterator> #include <string> using namespace std; int main(){ int A,B; cin >> A >> B; if (A+B>=10){ cout <"error"<endl; } else { cout << A + B <<endl; } }
a.cc: In function 'int main()': a.cc:23:10: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [6]') 23 | cout <"error"<endl; | ~~~~ ^~~~~~~~ | | | | | const char [6] | std::ostream {aka std::basic_ostream<char>} In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/bits/specfun.h:43, from /usr/include/c++/14/cmath:3906, from a.cc:3: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:23:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>' 23 | cout <"error"<endl; | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:23:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 23 | cout <"error"<endl; | ^~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:23:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 23 | cout <"error"<endl; | ^~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:23:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 23 | cout <"error"<endl; | ^~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:23:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 23 | cout <"error"<endl; | ^~~~~~~ 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:5: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:23:11: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 23 | cout <"error"<endl; | ^~~~~~~ /usr/include/c++/14/string_view:680: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> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:23:11: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 23 | cout <"error"<endl; | ^~~~~~~ /usr/include/c++/14/string_view:688: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>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:23:11: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'const char*' 23 | cout <"error"<endl; | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874: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>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:23:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 23 | cout <"error"<endl; | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed: a.cc:23:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 23 | cout <"error"<endl; | ^~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3901 | operator<(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed: a.cc:23:11: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 23 | cout <"error"<endl; | ^~~~~~~ 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:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:23:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::tuple<_UTypes ...>' 23 | cout <"error"<endl; | ^~~~~~~ In file included from /usr/include/c++/14/deque:66, from a.cc:7: /usr/include/c++/14/bits/stl_deque.h:2334:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const deque<_Tp, _Alloc>&, const deque<_Tp, _Alloc>&)' 2334 | operator<(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_deque.h:2334:5: note: template argument deduction/substitution failed: a.cc:23:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::deque<_Tp, _Alloc>' 23 | cout <"error"<endl; | ^~~~~~~ In file included from /usr/include/c++/14/list:65, from a.cc:8: /usr/include/c++/14/bits/stl_list.h:2188:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const __cxx11::list<_Tp, _Alloc>&, const __cxx11::list<_Tp, _Alloc>&)' 2188 | operator<(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_list.h:2188:5: note: template argument deduction/substitution failed: a.cc:23:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::list<_Tp, _Alloc>' 23 | cout <"error"<endl; | ^~~~~~~ In file included from /usr/include/c++/14/map:63, from a.cc:9: /usr/include/c++/14/bits/stl_map.h:1550:5: note: candidate: 'template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator<(const map<_Key, _Tp, _Compare, _Allocator>&, const map<_Key, _Tp, _Compare, _Allocator>&)' 1550 | operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_map.h:1550:5: note: template argument deduction/substitution failed: a.cc:23:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::map<_Key, _Tp, _Compare, _Allocator>' 23 | cout <"error"<endl; | ^~~~~~~ In file included from /usr/include/c++/14/map:64: /usr/include/c++/14/bits/stl_multimap.h:1172:5: note: candidate: 'template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator<(const
s592311470
p03697
C++
#include<iostream> #include<algorithm> #include<string> #include<functional> #include<utility> #include<stack> #include<queue> #include<cmath> #include<list> #include<cstdint> #include<vector> #include<map> #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) #define rep(i,rept) for(ll i = 0; i<rept;i++) typedef long long ll; ll nCr(ll n, ll r) { if (r > n) { return 0; } if (r * 2 > n) r = n - r; ll dividend = 1; ll divisor = 1; for (ll i = 1; i <= r; ++i) { dividend *= (n - i + 1); divisor *= i; } return dividend / divisor; } ll sumdigit(ll n) { ll dig = 0, sum = 0; while (n) { dig = n % 10; sum = sum + dig; n = n / 10; } return sum; } int main() { int a, b; std::cin >> a >> b; if (a + b >= 10) { std::cout << "error" << std::endl; return 0; } else { std::cout << a+b << std::endl: } }
a.cc: In function 'int main()': a.cc:50:46: error: expected ';' before ':' token 50 | std::cout << a+b << std::endl: | ^ | ;
s807338884
p03697
C++
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n; cin >> n; int sum = 0; set<int> s; for (int i = 0; i < n; ++i) { int score; cin >> score; s.insert(score); sum += score; } if (sum % 10 != 0) { cout << sum << "\n"; return 0; } sort(s.begin(), s.end()); for (auto& e : s) { if (e % 10 == 0) continue; cout << sum - e << "\n"; return 0; } cout << "0\n"; }
In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = _Rb_tree_const_iterator<int>; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = _Rb_tree_const_iterator<int>]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:23:7: required from here 23 | sort(s.begin(), s.end()); | ~~~~^~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1906:50: error: no match for 'operator-' (operand types are 'std::_Rb_tree_const_iterator<int>' and 'std::_Rb_tree_const_iterator<int>') 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~^~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67, from /usr/include/c++/14/algorithm:60: /usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 618 | operator-(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:618:5: note: template argument deduction/substitution failed: /usr/include/c++/14/bits/stl_algo.h:1906:50: note: 'std::_Rb_tree_const_iterator<int>' is not derived from 'const std::reverse_iterator<_Iterator>' 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~^~~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1790 | operator-(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1790:5: note: template argument deduction/substitution failed: /usr/include/c++/14/bits/stl_algo.h:1906:50: note: 'std::_Rb_tree_const_iterator<int>' is not derived from 'const std::move_iterator<_IteratorL>' 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~^~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166: /usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)' 1197 | _DEFINE_BINARY_OPERATOR(-, __minus) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed: /usr/include/c++/14/bits/stl_algo.h:1906:50: note: 'std::_Rb_tree_const_iterator<int>' is not derived from 'const std::valarray<_Tp>' 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~^~~~~~~~~ /usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)' 1197 | _DEFINE_BINARY_OPERATOR(-, __minus) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed: /usr/include/c++/14/bits/stl_algo.h:1906:50: note: 'std::_Rb_tree_const_iterator<int>' is not derived from 'const std::valarray<_Tp>' 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~^~~~~~~~~ /usr/include/c++/14/valarray:1197:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__minus, _Tp>::result_type> std::operator-(const valarray<_Tp>&, const valarray<_Tp>&)' 1197 | _DEFINE_BINARY_OPERATOR(-, __minus) | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/valarray:1197:1: note: template argument deduction/substitution failed: /usr/include/c++/14/bits/stl_algo.h:1906:50: note: 'std::_Rb_tree_const_iterator<int>' is not derived from 'const std::valarray<_Tp>' 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~^~~~~~~~~ In file included from /usr/include/c++/14/valarray:605: /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: /usr/include/c++/14/bits/stl_algo.h:1906:50: note: 'std::_Rb_tree_const_iterator<int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~^~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: /usr/include/c++/14/bits/stl_algo.h:1906:50: note: 'std::_Rb_tree_const_iterator<int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~^~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: /usr/include/c++/14/bits/stl_algo.h:1906:50: note: 'std::_Rb_tree_const_iterator<int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~^~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: /usr/include/c++/14/bits/stl_algo.h:1906:50: note: 'std::_Rb_tree_const_iterator<int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~^~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__minus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__minus, typename _Dom1::value_type>::result_type> std::operator-(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)' 406 | _DEFINE_EXPR_BINARY_OPERATOR(-, struct std::__minus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/valarray_after.h:406:5: note: template argument deduction/substitution failed: /usr/include/c++/14/bits/stl_algo.h:1906:50: note: 'std::_Rb_tree_const_iterator<int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~^~~~~~~~~ In file included from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/complex:465:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const complex<_Tp>&)' 465 | operator-(const complex<_Tp>& __x) | ^~~~~~~~ /usr/include/c++/14/complex:465:5: note: candidate expects 1 argument, 2 provided /usr/include/c++/14/complex:388:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator-(const _Tp&, const complex<_Tp>&)' 388 | operator-(const _Tp& __x, const complex<_Tp>& __y) | ^~~~~~~~ /usr/include/c++/14/complex:388:5: note: template argument deduction/substitution failed: /u
s263706424
p03697
C++
#include <iostream> int main() { int A, B; std::cin << A << B; if(A + B >= 10){ std::cout << "error"; }else{ std::cout << A + B; } return 0; }
a.cc: In function 'int main()': a.cc:6:13: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 6 | std::cin << A << B; | ~~~~~~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:6:13: note: candidate: 'operator<<(int, int)' (built-in) 6 | std::cin << A << B; | ~~~~~~~~~^~~~ a.cc:6:13: 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:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | std::cin << A << B; | ^ /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:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | std::cin << A << B; | ^ 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:6:9: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 6 | std::cin << A << B; | ~~~~~^~~ 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:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | std::cin << A << B; | ^ /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:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | std::cin << A << B; | ^ /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:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | std::cin << A << B; | ^ /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:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | std::cin << A << B; | ^ /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:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | std::cin << A << B; | ^ /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:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | std::cin << A << B; | ^ /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:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | std::cin << A << B; | ^ 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:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 6 | std::cin << A << B; | ^ /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:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | std::cin << A << B; | ^ /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:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | std::cin << A << B; | ^ /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:6:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 6 | std::cin << A << B; | ^ /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:6:16: required from here 6 | std::cin << A << B; | ^ /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) | ^~~~~~~~
s815376857
p03697
C++
#include<bits/stdc++.h> using namespace std; #define rp(i,n) for(int i=0;i<n;i++) #define rep(i,m,n) for(int i=m;i<=n;i++) #define lrp(i,n) for(long long i=0;i<n;i++) #define lrep(i,m,n) for(long long i=m;i<=n;i++) #define ll long long #define sort(a) sort(a.begin(),a.end()) #define reverse(a) reverse(a.begin(),a.end()) #define vi vector<int> #define vl vector<long long> #define pb push_back #define abs(a,b) (a-b>0?a-b:b-a) #define size size() int main(){ int n,m; cin >> n >> m; cout << (n+m>=10?"error":m+n) << endl; }
a.cc: In function 'int main()': a.cc:19:21: error: operands to '?:' have different types 'const char*' and 'int' 19 | cout << (n+m>=10?"error":m+n) << endl; | ~~~~~~~^~~~~~~~~~~~
s077511789
p03697
C++
#include <bits/stdcpp.h> using namespace std; int main(){ int a,b; cin >> a; cin >> b; if(a+b>9) cout << "error" << endl; else cout << a+b << endl; }
a.cc:1:10: fatal error: bits/stdcpp.h: No such file or directory 1 | #include <bits/stdcpp.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s307803145
p03697
C++
#include <bits/stdc++.h> using namespace sdd; int main(){ int a,b; cin >> a; cin >> b; if(a+b>9) cout << "error" << endl; else cout << a+b << endl; }
a.cc:3:17: error: 'sdd' is not a namespace-name 3 | using namespace sdd; | ^~~ 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; | ^~~ | 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:8:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 8 | if(a+b>9) cout << "error" << 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:8:32: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 8 | if(a+b>9) cout << "error" << 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) | ^~~~ a.cc:9:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | else cout << a+b << 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:9:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 9 | else cout << a+b << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s572763054
p03697
C++
#include <bits/stdc++.h> using namespace std; #define INF 1<<30 #define LINF 1ll<<60ll #define MOD 1000000007 #define pb(a) push_back(a) #define vi vector<int> #define vl vector<long long> #define vvi vector<vi> #define P pair<int,int> #define all(vec) (vec.begin()),(vec.end()) typedef long long ll; typedef unsigned long long ull; #define sz(x) ((int)(x).size()) #define in(x) int x;cin>>x #define bit(n) (1<<(n)) #define REP(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i) #define REPR(i, n) for(int i = n;i >= 0;--i) #define REP3(i, m, n) for(int i = m, i##_len=(n);i < i##_len;++i) #define FORVEC(i, v) for(int i = 0;i < sz(v);++i) template<class T>bool chmax(T &a,const T &b){if(a<b){a=b;return true;}return false;} template<class T>bool chmin(T &a,const T &b){if(a>b){a=b;return true;}return false;} #define fil0(i,n) cout<<swet(n)<<setfill('0')<<i<<resetiosflags(ios_base::floatfield) #define YES(n) cout<<((n)?"YES":"NO")<<endl #define Yes(n) cout<<((n)?"Yes":"No")<<endl #define yes(n) cout<<((n)?"yes":"no")<<endl #define possible(n) cout<<((n)?"possible":"impossible")<<endl #define Possible(n) cout<<((n)?"Possible":"Impossible")<<endl int main(){ int a,b; cin>>a>>b; cout<<((a+b>=10)?"error":a+b)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:39:21: error: operands to '?:' have different types 'const char*' and 'int' 39 | cout<<((a+b>=10)?"error":a+b)<<endl; | ~~~~~~~~~^~~~~~~~~~~~
s970711968
p03697
Java
import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import java.util.NoSuchElementException; public class Main { public static void main(String[] args) { FastScanner sc = new FastScanner(); a = sc.nextInt(); b = sc.nextInt(); if (a+b >= 10) { System.out.println("error"); } else { System.out.println(a+b); } } } class FastScanner { public static String debug = null; private final InputStream in = System.in; private int ptr = 0; private int buflen = 0; private byte[] buffer = new byte[1024]; private boolean eos = false; private boolean hasNextByte() { if (ptr < buflen) { return true; } else { ptr = 0; try { if (debug != null) { buflen = debug.length(); buffer = debug.getBytes(); debug = ""; eos = true; } else { buflen = in.read(buffer); } } catch (IOException e) { e.printStackTrace(); } if (buflen < 0) { eos = true; return false; } else if (buflen == 0) { return false; } } return true; } private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1; } private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126; } private void skipUnprintable() { while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; } public boolean isEOS() { return this.eos; } public boolean hasNext() { skipUnprintable(); return hasNextByte(); } public String next() { if (!hasNext()) throw new NoSuchElementException(); StringBuilder sb = new StringBuilder(); int b = readByte(); while (isPrintableChar(b)) { sb.appendCodePoint(b); b = readByte(); } return sb.toString(); } public long nextLong() { if (!hasNext()) throw new NoSuchElementException(); long n = 0; boolean minus = false; int b = readByte(); if (b == '-') { minus = true; b = readByte(); } if (b < '0' || '9' < b) { throw new NumberFormatException(); } while (true) { if ('0' <= b && b <= '9') { n *= 10; n += b - '0'; } else if (b == -1 || !isPrintableChar(b)) { return minus ? -n : n; } else { throw new NumberFormatException(); } b = readByte(); } } public int nextInt() { return (int) nextLong(); } public long[] nextLongList(int n) { return nextLongTable(1, n)[0]; } public int[] nextIntList(int n) { return nextIntTable(1, n)[0]; } public long[][] nextLongTable(int n, int m) { long[][] ret = new long[n][m]; for (int i = 0; i < n; i ++) { for (int j = 0; j < m; j ++) { ret[i][j] = nextLong(); } } return ret; } public int[][] nextIntTable(int n, int m) { int[][] ret = new int[n][m]; for (int i = 0; i < n; i ++) { for (int j = 0; j < m; j ++) { ret[i][j] = nextInt(); } } return ret; } }
Main.java:10: error: cannot find symbol a = sc.nextInt(); ^ symbol: variable a location: class Main Main.java:11: error: cannot find symbol b = sc.nextInt(); ^ symbol: variable b location: class Main Main.java:12: error: cannot find symbol if (a+b >= 10) { ^ symbol: variable a location: class Main Main.java:12: error: cannot find symbol if (a+b >= 10) { ^ symbol: variable b location: class Main Main.java:15: error: cannot find symbol System.out.println(a+b); ^ symbol: variable a location: class Main Main.java:15: error: cannot find symbol System.out.println(a+b); ^ symbol: variable b location: class Main 6 errors
s373078594
p03697
C++
#include<iostream> using namespace std; int main(void){ int a, b; cin>>a>>b; cout<<((a+b<10)?(a+b):("error"))<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:18: error: operands to '?:' have different types 'int' and 'const char*' 6 | cout<<((a+b<10)?(a+b):("error"))<<endl; | ~~~~~~~~^~~~~~~~~~~~~~~~
s794351666
p03697
C++
#include<iostream> #include<string> using namespace std; int main(void){ int a, b; cin>>a>>b; cout<<((a+b)<10?(a+b):("error"))<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:18: error: operands to '?:' have different types 'int' and 'const char*' 7 | cout<<((a+b)<10?(a+b):("error"))<<endl; | ~~~~~~~~^~~~~~~~~~~~~~~~
s073163867
p03697
C++
#include<iostream> #include<string> using namespace std; int main(void){ int a, b; cin>>a>>b; cout<<((a+b<10)?(a+b):("error"))<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:18: error: operands to '?:' have different types 'int' and 'const char*' 7 | cout<<((a+b<10)?(a+b):("error"))<<endl; | ~~~~~~~~^~~~~~~~~~~~~~~~
s013877872
p03697
C++
#include<bits/stdc++.h> using namespace std; int main(void){ int a, b; cin >> a >> b; cout << (((a+b)>=10) ? "error" : a+b) << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:24: error: operands to '?:' have different types 'const char*' and 'int' 9 | cout << (((a+b)>=10) ? "error" : a+b) << endl; | ~~~~~~~~~~~~^~~~~~~~~~~~~~~
s172751180
p03697
C++
#include<bits/stdc++.h> using namespace std; int main(void){ int a, b; cin >> a >> b; cout << ((a+b)>=10) ? "error" : a+b << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:39: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 9 | cout << ((a+b)>=10) ? "error" : a+b << endl; | ~~~~^~~~~~~
s267945582
p03697
C++
#include<bits/stdc++.h> using namespace std; int main(void){ int a, b; cin >> a >> b; cout << ((a+b)>=10) ? "error" : a+b << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:39: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 9 | cout << ((a+b)>=10) ? "error" : a+b << endl; | ~~~~^~~~~~~
s372396150
p03697
C++
#include<bits/stdc++.h> using namespace std; int main(void){ int a, b; cin >> a >> b; cout << (a+b)>=10 ? "error" : a+b << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:16: error: no match for 'operator>=' (operand types are 'std::basic_ostream<char>' and 'int') 9 | cout << (a+b)>=10 ? "error" : a+b << endl; | ~~~~~~~~~~~~~^~~~ | | | | | int | std::basic_ostream<char> a.cc:9:16: note: candidate: 'operator>=(int, int)' (built-in) 9 | cout << (a+b)>=10 ? "error" : a+b << endl; | ~~~~~~~~~~~~~^~~~ a.cc:9:16: note: no known conversion for argument 1 from 'std::basic_ostream<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:1165:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator>=(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1165 | operator>=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1165:5: note: template argument deduction/substitution failed: a.cc:9:18: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout << (a+b)>=10 ? "error" : a+b << endl; | ^~ /usr/include/c++/14/bits/regex.h:1248: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>&)' 1248 | operator>=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1248:5: note: template argument deduction/substitution failed: a.cc:9:18: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 9 | cout << (a+b)>=10 ? "error" : a+b << endl; | ^~ /usr/include/c++/14/bits/regex.h:1341: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>&)' 1341 | operator>=(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1341:5: note: template argument deduction/substitution failed: a.cc:9:18: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout << (a+b)>=10 ? "error" : a+b << endl; | ^~ /usr/include/c++/14/bits/regex.h:1415:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>=(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1415 | operator>=(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1415:5: note: template argument deduction/substitution failed: a.cc:9:18: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 9 | cout << (a+b)>=10 ? "error" : a+b << endl; | ^~ /usr/include/c++/14/bits/regex.h:1509:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>=(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1509 | operator>=(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1509:5: note: template argument deduction/substitution failed: a.cc:9:18: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout << (a+b)>=10 ? "error" : a+b << endl; | ^~ /usr/include/c++/14/bits/regex.h:1586:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>=(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1586 | operator>=(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1586:5: note: template argument deduction/substitution failed: a.cc:9:18: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int' 9 | cout << (a+b)>=10 ? "error" : a+b << endl; | ^~ /usr/include/c++/14/bits/regex.h:1686:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>=(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1686 | operator>=(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1686:5: note: template argument deduction/substitution failed: a.cc:9:18: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | cout << (a+b)>=10 ? "error" : a+b << endl; | ^~ 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:1070:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>=(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1070 | operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1070:5: note: template argument deduction/substitution failed: a.cc:9:18: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 9 | cout << (a+b)>=10 ? "error" : a+b << endl; | ^~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:476:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>=(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 476 | operator>=(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:476:5: note: template argument deduction/substitution failed: a.cc:9:18: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 9 | cout << (a+b)>=10 ? "error" : a+b << endl; | ^~ /usr/include/c++/14/bits/stl_iterator.h:520:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>=(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 520 | operator>=(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:520:5: note: template argument deduction/substitution failed: a.cc:9:18: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 9 | cout << (a+b)>=10 ? "error" : a+b << endl; | ^~ /usr/include/c++/14/bits/stl_iterator.h:1724:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1724 | operator>=(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1724:5: note: template argument deduction/substitution failed: a.cc:9:18: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 9 | cout << (a+b)>=10 ? "error" : a+b << endl; | ^~ /usr/include/c++/14/bits/stl_iterator.h:1781:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1781 | operator>=(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1781:5: note: template argument deduction/substitution failed: a.cc:9:18: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 9 | cout << (a+b)>=10 ? "error" : a+b << endl; | ^~ 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:739:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>=(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 739 | operator>=(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:739:5: note: template argument deduction/substitution failed: a.cc:9:18: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 9 | cout << (a+b)>=10 ? "error" : a+b << endl; | ^~ /usr/include/c++/14/string_view:746: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> >)' 746 | operator>=(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:746:5: note: template argument deduction/substitution failed: a.cc:9:18: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 9 | cout << (a+b)>=10 ? "error" : a+b << endl; | ^~ /usr/include/c++/14/string_view:754: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>)' 754 | operator>=(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:754:5: note: template argument deduction/substitution failed: a.cc:9:18: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 9 | cout << (a+b)>=10 ? "error" : a+b << endl; | ^~ /usr/include/c++/14/bits/basic_string.h:3997: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>&)' 3997 | operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, |
s916666682
p03697
C++
#include <bits/stdc++.h> using namespace std; int main(){ cin>>x>>y; if(x+y>9)cout<<"error"; else cout<<x+y; }
a.cc: In function 'int main()': a.cc:4:8: error: 'x' was not declared in this scope 4 | cin>>x>>y; | ^ a.cc:4:11: error: 'y' was not declared in this scope; did you mean 'yn'? 4 | cin>>x>>y; | ^ | yn
s769239853
p03697
C++
#include <iostream> int main() { int a, b; std::cin >> a >> b; if (a + b < 10) { std::cout << a + b << std::endl; } else { std::cout<<"error"<<std::endl; }
a.cc: In function 'int main()': a.cc:10:10: error: expected '}' at end of input 10 | } | ^ a.cc:2:12: note: to match this '{' 2 | int main() { | ^
s464023295
p03697
C++
#include<bits/tdc++.h> using namespace std; int main() { int a, b; cin >> a >> b; if (a + b >= 10) { cout << "error" << endl; } else { cout << a + b << endl; } }
a.cc:1:9: fatal error: bits/tdc++.h: No such file or directory 1 | #include<bits/tdc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s841447155
p03697
C++
using namespace std; int main() { int a,b,c; cin>>a>>b; c = a + b; if(c<10) cout<<c<<endl; else cout<<"error"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope 6 | cin>>a>>b; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:9:9: error: 'cout' was not declared in this scope 9 | cout<<c<<endl; | ^~~~ a.cc:9:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:9:18: error: 'endl' was not declared in this scope 9 | cout<<c<<endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | using namespace std; a.cc:11:9: error: 'cout' was not declared in this scope 11 | cout<<"error"<<endl; | ^~~~ a.cc:11:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:11:24: error: 'endl' was not declared in this scope 11 | cout<<"error"<<endl; | ^~~~ a.cc:11:24: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s842570704
p03697
C++
#include<iostream> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<a+b<<endl; if(a+b>=10){ cout<<"error"<<endl; }
a.cc: In function 'int main()': a.cc:9:2: error: expected '}' at end of input 9 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s206488219
p03697
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; if(a+b>=10)cout<<"error"<endl; else cout<<a+b<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:27: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 7 | if(a+b>=10)cout<<"error"<endl; | ~~~~~~~~~~~~~^~~~~ 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:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed: a.cc:7:28: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(a+b>=10)cout<<"error"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1224: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>&)' 1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed: a.cc:7:28: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 7 | if(a+b>=10)cout<<"error"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1317: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>&)' 1317 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed: a.cc:7:28: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(a+b>=10)cout<<"error"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed: a.cc:7:28: note: couldn't deduce template parameter '_Bi_iter' 7 | if(a+b>=10)cout<<"error"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1485 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed: a.cc:7:28: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(a+b>=10)cout<<"error"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed: a.cc:7:28: note: couldn't deduce template parameter '_Bi_iter' 7 | if(a+b>=10)cout<<"error"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1660 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed: a.cc:7:28: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(a+b>=10)cout<<"error"<endl; | ^~~~ 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:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:7:28: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 7 | if(a+b>=10)cout<<"error"<endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:7:28: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if(a+b>=10)cout<<"error"<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:7:28: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if(a+b>=10)cout<<"error"<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:7:28: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 7 | if(a+b>=10)cout<<"error"<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:7:28: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 7 | if(a+b>=10)cout<<"error"<endl; | ^~~~ 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:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:7:28: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | if(a+b>=10)cout<<"error"<endl; | ^~~~ /usr/include/c++/14/string_view:680: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> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:7:28: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 7 | if(a+b>=10)cout<<"error"<endl; | ^~~~ /usr/include/c++/14/string_view:688: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>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:7:28: note: couldn't deduce template parameter '_CharT' 7 | if(a+b>=10)cout<<"error"<endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874: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>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:7:28: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 7 | if(a+b>=10)cout<<"error"<endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'temp
s006980619
p03697
C++
#include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; if(a+b => 10){ cout << "error" << endl; }else{ cout << a + b << endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:17: error: expected primary-expression before '>' token 7 | if(a+b => 10){ | ^
s591350322
p03697
C++
#include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; if(a+b => 10){ cout << "error" << endl; }else{ cout << a + b << nedl; } return 0; }
a.cc: In function 'int main()': a.cc:7:17: error: expected primary-expression before '>' token 7 | if(a+b => 10){ | ^ a.cc:10:34: error: 'nedl' was not declared in this scope 10 | cout << a + b << nedl; | ^~~~
s660314244
p03697
C++
<?php # スペース区切りの整数の入力 fscanf(STDIN, "%d %d", $a, $b); # 出力 $sum = $a + $b; if ($sum >= 10) { echo "error\n"; } else { echo $sum."\n"; } ?>
a.cc:2:3: error: invalid preprocessing directive #\U000030b9\U000030da\U000030fc\U000030b9\U0000533a\U00005207\U0000308a\U0000306e\U00006574\U00006570\U0000306e\U00005165\U0000529b 2 | # スペース区切りの整数の入力 | ^~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:5:3: error: invalid preprocessing directive #\U000051fa\U0000529b 5 | # 出力 | ^~~~ a.cc:1:1: error: expected unqualified-id before '<' token 1 | <?php | ^ a.cc:6:1: error: '$sum' does not name a type 6 | $sum = $a + $b; | ^~~~ a.cc:7:1: error: expected unqualified-id before 'if' 7 | if ($sum >= 10) { | ^~ a.cc:9:3: error: expected unqualified-id before 'else' 9 | } else { | ^~~~ a.cc:12:1: error: expected unqualified-id before '?' token 12 | ?> | ^
s256929629
p03697
C++
<?php # スペース区切りの整数の入力 fscanf(STDIN, "%d %d", $a, $b); # 出力 $sum = $a + $b; if ($sum >= 10) { echo "error\n'\"; } else { echo $sum."\n"; } ?>
a.cc:2:3: error: invalid preprocessing directive #\U000030b9\U000030da\U000030fc\U000030b9\U0000533a\U00005207\U0000308a\U0000306e\U00006574\U00006570\U0000306e\U00005165\U0000529b 2 | # スペース区切りの整数の入力 | ^~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:5:3: error: invalid preprocessing directive #\U000051fa\U0000529b 5 | # 出力 | ^~~~ a.cc:8:6: warning: missing terminating " character 8 | echo "error\n'\"; | ^ a.cc:8:6: error: missing terminating " character 8 | echo "error\n'\"; | ^~~~~~~~~~~~ a.cc:1:1: error: expected unqualified-id before '<' token 1 | <?php | ^ a.cc:6:1: error: '$sum' does not name a type 6 | $sum = $a + $b; | ^~~~ a.cc:7:1: error: expected unqualified-id before 'if' 7 | if ($sum >= 10) { | ^~ a.cc:9:3: error: expected unqualified-id before 'else' 9 | } else { | ^~~~ a.cc:12:1: error: expected unqualified-id before '?' token 12 | ?> | ^
s277578468
p03697
C++
<?php # スペース区切りの整数の入力 fscanf(STDIN, "%d %d", $a, $b); # 出力 $sum = $a + $b; if ($sum >= 10) { echo ($a+$b)." ".$s."\n"; ?>
a.cc:2:3: error: invalid preprocessing directive #\U000030b9\U000030da\U000030fc\U000030b9\U0000533a\U00005207\U0000308a\U0000306e\U00006574\U00006570\U0000306e\U00005165\U0000529b 2 | # スペース区切りの整数の入力 | ^~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:5:3: error: invalid preprocessing directive #\U000051fa\U0000529b 5 | # 出力 | ^~~~ a.cc:1:1: error: expected unqualified-id before '<' token 1 | <?php | ^ a.cc:6:1: error: '$sum' does not name a type 6 | $sum = $a + $b; | ^~~~ a.cc:7:1: error: expected unqualified-id before 'if' 7 | if ($sum >= 10) { | ^~
s803614523
p03697
C++
#include<iostream> using namespace std; int main(){ int A, B; int sum; cin >> A >> B; sum = A+B; if(sum>=10){ cout << "error"; }else{ cout << sum; } } ~ ~
a.cc:21:1: error: expected class-name before '~' token 21 | ~ | ^
s687974807
p03697
Java
import java.util.Scanner; public class Restricted { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); a = a + b; if(a >= 10)System.out.print("error"); else System.out.print(a); } }
Main.java:3: error: class Restricted is public, should be declared in a file named Restricted.java public class Restricted { ^ 1 error
s750821333
p03697
C++
#include <bits/stdc++.h> using namespace std; int main() { int A; int B; cin >> A; cin >> B; if( A + B >= 0 ) cout << "error" << endl; else cout << iSum << endl; return 0; }
a.cc: In function 'int main()': a.cc:15:25: error: 'iSum' was not declared in this scope 15 | cout << iSum << endl; | ^~~~
s125155227
p03697
C
#include <stdio.h> int main{ int a,b; scanf("%d %d",&a,&b); if(a+b>=10){ printf("error¥n"); } else{ printf("%d¥n",a+b); } return 0; }
main.c:3:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 3 | int main{ | ^
s689857025
p03697
C
#include <stdio.h> int main{ int a,b; scanf("%d %d",&a,&b); if(a+b>=10){ printf("error¥n"); } else{ printf{"%d¥n",a+b}; } return 0; }
main.c:3:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 3 | int main{ | ^
s920658960
p03697
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(0); int a, b; cin >> a >> b; cout << (a + b >= 10 ? "error" : a+b); return 0; }
a.cc: In function 'int main()': a.cc:11:30: error: operands to '?:' have different types 'const char*' and 'int' 11 | cout << (a + b >= 10 ? "error" : a+b); | ~~~~~~~~~~~~^~~~~~~~~~~~~~~
s020145176
p03697
C++
#include"bits/stdc++.h" using namespace std; int main(){ int a,b; cin>>a>>b; cout<<((a+b)<10?to_string(a+b):"error")<<endl;
a.cc: In function 'int main()': a.cc:7:49: error: expected '}' at end of input 7 | cout<<((a+b)<10?to_string(a+b):"error")<<endl; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s355693780
p03697
C++
#include <iostream> #include <vector> using namespace std; int main() { int a,b; cin>>a>>b; cout<<(a+b >= 10)? "error" : a+b<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:37: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 8 | cout<<(a+b >= 10)? "error" : a+b<<endl; | ~~~^~~~~~
s468082553
p03697
C++
#include <iostream> #include <vector> using namespace std; int main() { int a,b; cin>>a>>b; cout<<a+b>=10? "error" : a+b<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:14: error: no match for 'operator>=' (operand types are 'std::basic_ostream<char>' and 'int') 8 | cout<<a+b>=10? "error" : a+b<<endl; | ~~~~~~~~~^~~~ | | | | | int | std::basic_ostream<char> a.cc:8:14: note: candidate: 'operator>=(int, int)' (built-in) 8 | cout<<a+b>=10? "error" : a+b<<endl; | ~~~~~~~~~^~~~ a.cc:8:14: note: no known conversion for argument 1 from 'std::basic_ostream<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:476:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>=(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 476 | operator>=(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:476:5: note: template argument deduction/substitution failed: a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 8 | cout<<a+b>=10? "error" : a+b<<endl; | ^~ /usr/include/c++/14/bits/stl_iterator.h:520:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>=(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 520 | operator>=(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:520:5: note: template argument deduction/substitution failed: a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 8 | cout<<a+b>=10? "error" : a+b<<endl; | ^~ /usr/include/c++/14/bits/stl_iterator.h:1724:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1724 | operator>=(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1724:5: note: template argument deduction/substitution failed: a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 8 | cout<<a+b>=10? "error" : a+b<<endl; | ^~ /usr/include/c++/14/bits/stl_iterator.h:1781:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1781 | operator>=(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1781:5: note: template argument deduction/substitution failed: a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 8 | cout<<a+b>=10? "error" : a+b<<endl; | ^~ 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:1070:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>=(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1070 | operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1070:5: note: template argument deduction/substitution failed: a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 8 | cout<<a+b>=10? "error" : a+b<<endl; | ^~ 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:739:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>=(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 739 | operator>=(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:739:5: note: template argument deduction/substitution failed: a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | cout<<a+b>=10? "error" : a+b<<endl; | ^~ /usr/include/c++/14/string_view:746: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> >)' 746 | operator>=(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:746:5: note: template argument deduction/substitution failed: a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | cout<<a+b>=10? "error" : a+b<<endl; | ^~ /usr/include/c++/14/string_view:754: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>)' 754 | operator>=(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:754:5: note: template argument deduction/substitution failed: a.cc:8:16: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 8 | cout<<a+b>=10? "error" : a+b<<endl; | ^~ /usr/include/c++/14/bits/basic_string.h:3997: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>&)' 3997 | operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3997:5: note: template argument deduction/substitution failed: a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 8 | cout<<a+b>=10? "error" : a+b<<endl; | ^~ /usr/include/c++/14/bits/basic_string.h:4011:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>=(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 4011 | operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4011:5: note: template argument deduction/substitution failed: a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 8 | cout<<a+b>=10? "error" : a+b<<endl; | ^~ /usr/include/c++/14/bits/basic_string.h:4024:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>=(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4024 | operator>=(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4024:5: note: template argument deduction/substitution failed: a.cc:8:16: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 8 | cout<<a+b>=10? "error" : a+b<<endl; | ^~ 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:2631:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator>=(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2631 | operator>=(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2631:5: note: template argument deduction/substitution failed: a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 8 | cout<<a+b>=10? "error" : a+b<<endl; | ^~ In file included from /usr/include/c++/14/vector:66, from a.cc:2: /usr/include/c++/14/bits/stl_vector.h:2114:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator>=(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)' 2114 | operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:2114:5: note: template argument deduction/substitution failed: a.cc:8:16: note: 'std::basic_ostream<char>' is not derived from 'const std::vector<_Tp, _Alloc>' 8 | cout<<a+b>=10? "error" : a+b<<endl; | ^~ a.cc:8:33: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 8 | cout<<a+b>=10? "error" : a+b<<endl; | ~~~^~~~~~
s700197958
p03697
C
#include<stdio.h> Int main(){ Int A,B; scanf("%d%d",&A,&B); A+=B; if(A>10){ printf("error"); }else{ printf("%d",A); } return 0; }
main.c:2:1: error: unknown type name 'Int'; did you mean 'int'? 2 | Int main(){ | ^~~ | int main.c: In function 'main': main.c:3:1: error: unknown type name 'Int'; did you mean 'int'? 3 | Int A,B; | ^~~ | int
s882046449
p03697
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 n = a+b; if(n < 10){ System.out.println(n); }else(n >= 10){ System.out.println("error"); } } }
Main.java:10: error: not a statement }else(n >= 10){ ^ Main.java:10: error: ';' expected }else(n >= 10){ ^ 2 errors
s964434910
p03697
C++
#include <bits/stdc++.h> using namespace std; int main(void) { int a, b; cin >> a >> b; cout << (a + b < 10 ? a + b : "error") << endl; }
a.cc: In function 'int main()': a.cc:7:25: error: operands to '?:' have different types 'int' and 'const char*' 7 | cout << (a + b < 10 ? a + b : "error") << endl; | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
s462896155
p03697
C++
#include <iostream> #include <string> #include <algorithm> #include <cmath> using namespace std; int main{ int a, b; cin >> a >> b; if(a + b < 10) cout << a + b << endl; else cout << "error" << endl; return 0; }
a.cc:7:5: error: cannot declare '::main' to be a global variable 7 | int main{ | ^~~~ a.cc:8:9: error: expected primary-expression before 'int' 8 | int a, b; | ^~~ a.cc:8:9: error: expected '}' before 'int' a.cc:7:9: note: to match this '{' 7 | int main{ | ^ a.cc:9:9: error: 'cin' does not name a type 9 | cin >> a >> b; | ^~~ a.cc:10:9: error: expected unqualified-id before 'if' 10 | if(a + b < 10) cout << a + b << endl; | ^~ a.cc:11:9: error: expected unqualified-id before 'else' 11 | else cout << "error" << endl; | ^~~~ a.cc:12:9: error: expected unqualified-id before 'return' 12 | return 0; | ^~~~~~ a.cc:13:1: error: expected declaration before '}' token 13 | } | ^
s078729745
p03697
Java
public class Atcoder_Virtual_A{ public static void main(String[] args){ Integer a = Integer.parseInt(args[0]); Integer b = Integer.parseInt(args[1]); if(a + b < 10){ System.out.println(a + b); }else{ System.out.println("error"); } } }
Main.java:2: error: class Atcoder_Virtual_A is public, should be declared in a file named Atcoder_Virtual_A.java public class Atcoder_Virtual_A{ ^ 1 error
s592324553
p03697
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <map> #include <stack> #include <cmath> #include <queue> #include <numeric> int main() { int n, m; std::cin >> n >> m; if (n + m >= 10) { std::cout << "error" << std::endl; } else { std::cout << a + b << std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:22:30: error: 'a' was not declared in this scope 22 | std::cout << a + b << std::endl; | ^ a.cc:22:34: error: 'b' was not declared in this scope 22 | std::cout << a + b << std::endl; | ^
s897603975
p03697
C++
#include <bits/stdc++.h> #include <algorithm> #include <stdio.h> #include <math.h> using namespace std; #define INF 1.1e9 #define LINF 1.1e18 #define FOR(i,a,b) for (int i = (a); i < (b); ++i) #define REP(i,n) FOR(i,0,n) #define ALL(v) (v).begin(), (v).end() #define pb push_back #define pf push_front #define fi first #define se second #define BIT(x,n) bitset<n>(x) typedef long long ll; typedef pair<int,int> P; typedef pair<P,int> PP; struct edge { int to,cost; edge(int t,int c):to(t),cost(c) {} }; int dx[]={1,-1,0,0},dy[]={0,0,1,-1}; int ddx[]={1,1,1,0,-1,-1,-1,0},ddy[]={1,0,-1,-1,-1,0,1,1}; ll mypow(ll x,ll n,ll m) { //xのn乗をmで割った余り if(n==0) return 1; if(n%2==0) return mypow(x*x%m,n/2,m); else return x*mypow(x,n-1,m)%m; } //----------------------------------------------------------------------------- int main() { cin.tie(0); ios::sync_with_stdio(false); int a,b; cin>>a>>b; cout<<(a+b>=10?"error":a+b)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:44:23: error: operands to '?:' have different types 'const char*' and 'int' 44 | cout<<(a+b>=10?"error":a+b)<<endl; | ~~~~~~~^~~~~~~~~~~~
s110885988
p03697
C++
#include <iostream> using namespace std; int main(){ int a, b; cin >> a >> b; if(a + b < 10){ cout << a + b; << endl; return 0; }else{ cout << "error" << endl; return 0; } }
a.cc: In function 'int main()': a.cc:7:32: error: expected primary-expression before '<<' token 7 | cout << a + b; << endl; | ^~
s626616469
p03697
C++
#include <iostream> int main(){ int a, b; cin >> a >> b; if(a + b < 10){ cout << a + b; << endl; return 0; }else{ cout << "error" << endl; return 0; } }
a.cc: In function 'int main()': a.cc:4:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | cin >> a >> b; | ^~~ | 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:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | cout << a + b; << 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:32: error: expected primary-expression before '<<' token 6 | cout << a + b; << endl; | ^~ a.cc:6:35: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | cout << a + b; << 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) | ^~~~ a.cc:9:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | cout << "error" << 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:9:36: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 9 | cout << "error" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s798383387
p03697
C++
#include <iostream> using namespace std; int main(void) { int a, b; cin >> a >> b; int sum = a + b; cout << (sum < 10 ? sum : "error") << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:21: error: operands to '?:' have different types 'int' and 'const char*' 7 | cout << (sum < 10 ? sum : "error") << endl; | ~~~~~~~~~^~~~~~~~~~~~~~~
s777907775
p03697
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<(a+b>9?"error":a+b)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:13: error: operands to '?:' have different types 'const char*' and 'int' 6 | cout<<(a+b>9?"error":a+b)<<endl; | ~~~~~^~~~~~~~~~~~
s014686974
p03697
C++
#include<bits/c++.h> using namespace std; int main(void){ int A, B; cin >> A >> B; if(A+B >= 10) cout << "error" << endl; else cout << A+B <<endl; return 0; }
a.cc:1:9: fatal error: bits/c++.h: No such file or directory 1 | #include<bits/c++.h> | ^~~~~~~~~~~~ compilation terminated.
s080500093
p03697
C
#include <stdio.h> int main () { int a, b; scanf("%d %d" &a, &b); int c = 0; c = a+b; if (c>=10) printf("error"); else printf("%d", a+b); return 0; }
main.c: In function 'main': main.c:5:16: error: invalid operands to binary & (have 'char *' and 'int') 5 | scanf("%d %d" &a, &b); | ~~~~~~~ ^ | | | char *
s551940730
p03697
C
#include <stdio.h> int main () { int a, b; scanf("%d %d" &a, &b); int c = 0; c = a+b; if (c>=10) printf("error"); else printf("%d", a+b); return 0; }
main.c: In function 'main': main.c:5:16: error: invalid operands to binary & (have 'char *' and 'int') 5 | scanf("%d %d" &a, &b); | ~~~~~~~ ^ | | | char *
s589816911
p03697
C++
#include <iostream> #include <vector> #include <algorithm> #include <cstdio> #include <queue> using namespace std; const int MAX_N = 10000; #define ll long long int N, A, B; vector<int> h; bool enough(int T) { ll cnt = 0; for (int i = 0; i < N; i++) { if (h[i] <= B*T) continue; cnt += (int)ceil((double)(h[i]-B*T) / (A-B)); } return cnt <= T; } int main() { //widespread cin >> N >> A >> B; h.resize(N); for (int i = 0; i < N; i++) { cin>>h[i]; } sort(h.begin(), h.end()); int l = -1; int r = h.back() / B + 1; while (r-l>1) { int m = (r+l) / 2; (enough(m) ? r : l) = m; } cout << r << endl; return 0; }
a.cc: In function 'bool enough(int)': a.cc:18:29: error: 'ceil' was not declared in this scope 18 | cnt += (int)ceil((double)(h[i]-B*T) / (A-B)); | ^~~~
s530106053
p03697
C++
A, B = [int(n) for n in input().split()] if A+B < 10: print(A+B) else: print("error")
a.cc:1:1: error: 'A' does not name a type 1 | A, B = [int(n) for n in input().split()] | ^
s989115059
p03697
C++
#include <iostream> #include <math.h> #include <algorithm> #include <vector> #include <numeric> using namespace std; const double PI = acos(-1.0); const string ALP = "abcdefghijklmnopqrstuvwxyz"; #define EXIST(s,e) ((s).find(e)!=(s).end()) #define SORT(c) sort((c).begin(),(c).end()) #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) int main(){ int a,b; cin >> a >> b; cout << ((a+b<10)?a+b:"error") << endl; return 0; }
a.cc: In function 'int main()': a.cc:16:20: error: operands to '?:' have different types 'int' and 'const char*' 16 | cout << ((a+b<10)?a+b:"error") << endl; | ~~~~~~~~^~~~~~~~~~~~
s612461601
p03697
Java
import java.util.*; public class main { public static void main(String args[]) { Scanner reader = new Scanner(System.in); int a=reader.nextInt(); int b=reader.nextInt(); int c=reader.nextInt(); if((100*a+10*b+c)%4==0) { System.out.println("YES"); } else { System.out.println("NO"); } } }
Main.java:3: error: class main is public, should be declared in a file named main.java public class main ^ 1 error
s653123253
p03697
C++
g#include <bits/stdc++.h> #define REP(i, n) for(int i = 0; i < (int)(n); ++i) #define FOR(i, m, n) for(int i = (m); i < (int)(n); ++i) #define ALL(x) (x).begin(), (x).end() #define INF 2000000000 #ifdef LOCAL #define eprintf(...) fprintf(stdout, __VA_ARGS__) #else #define eprintf(...) 0 #endif using namespace std; typedef long long LL; typedef unsigned long long ULL; typedef unsigned int uint; int main() { string s; cin >> s; map<char, int> mp; REP(i, s.size()) { char c = s[i]; if(mp[c] == 1) { cout << "no" << endl; return 0; } mp[c]++; } cout << "yes" << endl; return 0; return 0; }
a.cc:1:2: error: stray '#' in program 1 | g#include <bits/stdc++.h> | ^ a.cc:1:1: error: 'g' does not name a type 1 | g#include <bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:21:3: error: 'string' was not declared in this scope 21 | string s; | ^~~~~~ a.cc:22:3: error: 'cin' was not declared in this scope 22 | cin >> s; | ^~~ a.cc:22:10: error: 's' was not declared in this scope 22 | cin >> s; | ^ a.cc:23:3: error: 'map' was not declared in this scope 23 | map<char, int> mp; | ^~~ a.cc:23:7: error: expected primary-expression before 'char' 23 | map<char, int> mp; | ^~~~ a.cc:27:8: error: 'mp' was not declared in this scope 27 | if(mp[c] == 1) { | ^~ a.cc:28:7: error: 'cout' was not declared in this scope 28 | cout << "no" << endl; | ^~~~ a.cc:28:23: error: 'endl' was not declared in this scope 28 | cout << "no" << endl; | ^~~~ a.cc:31:5: error: 'mp' was not declared in this scope 31 | mp[c]++; | ^~ a.cc:33:3: error: 'cout' was not declared in this scope 33 | cout << "yes" << endl; | ^~~~ a.cc:33:20: error: 'endl' was not declared in this scope 33 | cout << "yes" << endl; | ^~~~
s450854326
p03697
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i, n) for(int i = 0; i < (n); i++) #define MEM(a, x) memset(a, x, sizeof(a)) #define ALL(a) a.begin(), a.end() #define UNIQUE(a) a.erase(unique(ALL(a)), a.end()) typedef long long ll; int a, b; int main(int argc, char const *argv[]) { ios_base::sync_with_stdio(false); cin >> a >> b; cout << (a+b >= 10 ? "error" : a+b) << endl; return 0; }
a.cc: In function 'int main(int, const char**)': a.cc:14:28: error: operands to '?:' have different types 'const char*' and 'int' 14 | cout << (a+b >= 10 ? "error" : a+b) << endl; | ~~~~~~~~~~^~~~~~~~~~~~~~~
s144565686
p03697
C
#include<stdio.h> int main(void){ int A,B; scanf("%d %d",&A,&B); if(A+B>=10){ printf(error\n); } else{ printf("%d\n",A+B); } return 0; }
main.c: In function 'main': main.c:6:23: error: stray '\' in program 6 | printf(error\n); | ^ main.c:6:18: error: 'error' undeclared (first use in this function); did you mean 'perror'? 6 | printf(error\n); | ^~~~~ | perror main.c:6:18: note: each undeclared identifier is reported only once for each function it appears in main.c:6:23: error: expected ')' before 'n' 6 | printf(error\n); | ~ ^~ | )
s046277497
p03697
C++
A, B = map(int, input().split()) print(A+B if A+B < 10 else 'error')
a.cc:3:28: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 3 | print(A+B if A+B < 10 else 'error') | ^~~~~~~ a.cc:1:1: error: 'A' does not name a type 1 | A, B = map(int, input().split()) | ^
s555741300
p03697
C
#include <stdio.h> #include <string.h> int main(void){ char a[26]; int len, i,j; scanf("%s"&a[]); len = strlen(a); for(i=0;i+1<len;i++){ for(j=i+1;j<len;j++){ if(a[i]==a[j]){ printf("no"); return 0; } } } printf("yes"); return 0; }
main.c: In function 'main': main.c:6:14: error: expected expression before ']' token 6 | scanf("%s"&a[]); | ^
s015132663
p03697
C++
#include<cstdio> #include<iostream> using namespace std; int main(void){ int a,b; sin>>a>>b; if(a+b>=10) cout<<"error"<<endl; else cout<<a+b<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'sin' was not declared in this scope 6 | sin>>a>>b; | ^~~
s394908242
p03697
C++
#include<stdio.h> int main(void) { int a,b; scanf("%d %d",&a,&b); a=a+b; if(a>9) printf("error\n"); else printf("%d",a); retrn 0; }
a.cc: In function 'int main()': a.cc:9:9: error: 'retrn' was not declared in this scope 9 | retrn 0; | ^~~~~
s100039443
p03697
C++
#include<cstdio> #includee<iostream> using namespace std; int main(void){ int a,b; sin>>a>>b; if(a+b>=10) cout<<"error"<<endl; else cout<<a+b<<endl; return 0; }
a.cc:2:2: error: invalid preprocessing directive #includee; did you mean #include? 2 | #includee<iostream> | ^~~~~~~~ | include a.cc: In function 'int main()': a.cc:6:9: error: 'sin' was not declared in this scope; did you mean 'stdin'? 6 | sin>>a>>b; | ^~~ | stdin a.cc:7:21: error: 'cout' was not declared in this scope 7 | if(a+b>=10) cout<<"error"<<endl; | ^~~~ a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include<cstdio> +++ |+#include <iostream> 2 | #includee<iostream> a.cc:7:36: error: 'endl' was not declared in this scope 7 | if(a+b>=10) cout<<"error"<<endl; | ^~~~ a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' 1 | #include<cstdio> +++ |+#include <ostream> 2 | #includee<iostream> a.cc:8:14: error: 'cout' was not declared in this scope 8 | else cout<<a+b<<endl; | ^~~~ a.cc:8:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:8:25: error: 'endl' was not declared in this scope 8 | else cout<<a+b<<endl; | ^~~~ a.cc:8:25: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s935405997
p03697
C++
#include <bits/stdc++.h> #define ll long long using namespace std; int main(void){ int x,y; cin >> x >> y; cout << (x+y < 10) ? (x+y) : "error" << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:39: error: invalid operands of types 'const char [6]' and '<unresolved overloaded function type>' to binary 'operator<<' 7 | cout << (x+y < 10) ? (x+y) : "error" << endl; | ~~~~~~~~^~~~~~~
s731607830
p03697
C++
#include"bits/stdc++.h" #define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++) #define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME #define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__) #define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__) using namespace std; using ll = long long; using pos = pair<ll, ll>; ll a,b; void solve(); int main() { solve(); return 0; } void solve() { cin >>a>>b; if (a+b<10){ cout << a+b; else{ cout << "error"; } cout << endl; }
a.cc: In function 'void solve()': a.cc:29:9: error: expected '}' before 'else' 29 | else{ | ^~~~ a.cc:27:20: note: to match this '{' 27 | if (a+b<10){ | ^
s060325395
p03697
C++
#include"bits/stdc++.h" #define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++) #define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME #define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__) #define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__) using namespace std; using ll = long long; using pos = pair<ll, ll>; ll a,b; void solve(); int main() { solve(); return 0; } void solve() { cin >>a>>b; cout << (a+b<10?(string)(a+b):"error") << endl; }
a.cc: In function 'void solve()': a.cc:27:37: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(ll)' 27 | cout << (a+b<10?(string)(a+b):"error") << endl; | ^ In file included 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, from a.cc:1: /usr/include/c++/14/bits/basic_string.h:800:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 800 | basic_string(const _Tp& __t, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:800:9: note: template argument deduction/substitution failed: In file included from /usr/include/c++/14/bits/stl_pair.h:60, 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/type_traits: In substitution of 'template<bool _Cond, class _Tp> using std::enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]': /usr/include/c++/14/bits/basic_string.h:149:8: required by substitution of 'template<class _CharT, class _Traits, class _Alloc> template<class _Tp, class _Res> using std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv = std::enable_if_t<((bool)std::__and_<std::is_convertible<const _Tp&, std::basic_string_view<_CharT, _Traits> >, std::__not_<std::is_convertible<const _Tp*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>*> >, std::__not_<std::is_convertible<const _Tp&, const _CharT*> > >::value), _Res> [with _Tp = long long int; _Res = void; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 149 | using _If_sv = enable_if_t< | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:797:30: required from here 797 | template<typename _Tp, typename = _If_sv<_Tp, void>> | ^~~~~~~~ /usr/include/c++/14/type_traits:2711:11: error: no type named 'type' in 'struct std::enable_if<false, void>' 2711 | using enable_if_t = typename enable_if<_Cond, _Tp>::type; | ^~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:788:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, size_type, size_type, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 788 | basic_string(const _Tp& __t, size_type __pos, size_type __n, | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:788:9: note: candidate expects 3 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:765:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator, _InputIterator, const _Alloc&) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 765 | basic_string(_InputIterator __beg, _InputIterator __end, | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:765:9: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:669:7: note: candidate: 'template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(size_type, _CharT, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 669 | basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:669:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:646:7: note: candidate: 'template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 646 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:646:7: note: template argument deduction/substitution failed: a.cc:27:35: note: cannot convert '(a + b)' (type 'll' {aka 'long long int'}) to type 'const char*' 27 | cout << (a+b<10?(string)(a+b):"error") << endl; | ~~^~~ /usr/include/c++/14/bits/basic_string.h:721:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 721 | basic_string(basic_string&& __str, const _Alloc& __a) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:721:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:716:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 716 | basic_string(const basic_string& __str, const _Alloc& __a) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:716:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:711:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::initializer_list<_Tp>, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 711 | basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:711:45: note: no known conversion for argument 1 from 'll' {aka 'long long int'} to 'std::initializer_list<char>' 711 | basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc()) | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/basic_string.h:682:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 682 | basic_string(basic_string&& __str) noexcept | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:682:35: note: no known conversion for argument 1 from 'll' {aka 'long long int'} to 'std::__cxx11::basic_string<char>&&' 682 | basic_string(basic_string&& __str) noexcept | ~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:624:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 624 | basic_string(const _CharT* __s, size_type __n, | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:624:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:604:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 604 | basic_string(const basic_string& __str, size_type __pos, | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:604:7: note: candidate expects 4 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:586:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 586 | basic_string(const basic_string& __str, size_type __pos, | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:586:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:569:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 569 | basic_string(const basic_string& __str, size_type __pos, | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:569:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/14/bits/basic_string.h:552:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 552 | basic_string(const basic_string& __str) | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:552:40: note: no known conversion for argument 1 from 'll' {aka 'long long int'} to 'const std::__cxx11::basic_string<char>&' 552 | basic_string(const basic_string& __str) | ~~~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/bits/basic_string.h:540:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 540 | basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT | ^~~~~~~~~~~~ /usr/include/c++/14/bits/basic_string.h:540:34: note: no known conversion for argument 1 from 'll' {aka 'long long int'} to 'const std::allocator<char>&' 540 | basic_string
s374069414
p03697
C++
#include"bits/stdc++.h" #define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++) #define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME #define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__) #define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__) using namespace std; using ll = long long; using pos = pair<ll, ll>; ll a,b; void solve(); int main() { solve(); return 0; } void solve() { cin >>a>>b; cout << (a+b<10?a+b:"error") << endl; }
a.cc: In function 'void solve()': a.cc:27:24: error: operands to '?:' have different types 'll' {aka 'long long int'} and 'const char*' 27 | cout << (a+b<10?a+b:"error") << endl; | ~~~~~~^~~~~~~~~~~~
s098031996
p03697
Java
import java.util.*; public class Restricted { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); if(A+B >= 10) System.out.println("error"); else System.out.println(A+B); } }
Main.java:2: error: class Restricted is public, should be declared in a file named Restricted.java public class Restricted { ^ 1 error