Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
72652 刘浩宇 青蛙跳台阶 C++ Compile Error 0 MS 0 KB 137 2024-05-12 10:58:52

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ long long a; cin>>a; cout<< pow(int (2,a-1)); return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:23: error: expression list treated as compound expression in functional cast [-fpermissive]
  cout<< pow(int (2,a-1));
                       ^
Main.cc:8:23: warning: left operand of comma operator has no effect [-Wunused-value]
Main.cc:8:24: error: no matching function for call to 'pow(int)'
  cout<< pow(int (2,a-1));
                        ^
In file included from /usr/include/features.h:367:0,
                 from /usr/include/assert.h:35,
                 from /usr/include/c++/5/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:33,
                 from Main.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:153:1: note: candidate: double pow(double, double)
 __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
 ^
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:153:1: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/5/valarray:587:0,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:94,
                 from Main.cc:1:
/usr/include/c++/5/bits/valarray_after.h:544:1: note: candidate: template std::_Expr, _Tp> std::pow(const _Tp&, const std::valarray<_Tp>&)
 _DEFINE_EXPR_BINARY_FUNCTION(pow, _Pow)
 ^
/usr/include/c++/5/bits/valarray_after.h:544:1: note:   template argument deduction/substitution failed:
Main.cc:8:24: note:   candidate expects 2 arguments, 1 provided
  cout<< pow(int (2,a-1));
                        ^
In file included from /usr/include/c++/5/valarray:587:0,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:94,
                 from Main.cc:1:
/usr/include/c++/5/bits/valarray_after.h:544:1: note: candidate: template std::_Expr, _Tp> std::pow(const std::valarray<_Tp>&, const _Tp&)
 _DEFINE_EXPR_BINARY_FUNCTION(pow, _Pow)
 ^
/usr/include/c++/5/bits/valarray_after.h:544:1: note:   template argument deduction/substitution failed:
Main.cc:8:24: note:   mismatched types 'const std::valarray<_Tp>' and 'int'
  cout<< pow(int (2,a-1));
                        ^
In file included from /usr/include/c++/5/valarray:587:0,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:94,
                 from Main.cc:1:
/usr/include/c++/5/bits/valarray_after.h:544:1: note: candidate: template std::_Expr, _Tp> std::pow(const std::valarray<_Tp>&, const std::valarray<_Tp>&)
 _DEFINE_EXPR_BINARY_FUNCTION(pow, _Pow)
 ^
/usr/include/c++/5/bits/valarray_after.h:544:1: note:   template argument deduction/substitution failed:
Main.cc:8:24: note:   mismatched types 'const std::valarray<_Tp>' and 'int'
  cout<< pow(int (2,a-1));
                        ^
In file included from /usr/include/c++/5/valarray:587:0,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:94,
                 from Main.cc:1:
/usr/include/c++/5/bits/valarray_after.h:544:1: note: candidate: template std::_Expr, typename _Dom::value_type> std::pow(const typename _Dom::value_type&, const std::_Expr<_Dom1, typename _Dom1::value_type>&)
 _DEFINE_EXPR_BINARY_FUNCTION(pow, _Pow)
 ^
/usr/include/c++/5/bits/valarray_after.h:544:1: note:   template argument deduction/substitution failed:
Main.cc:8:24: note:   candidate expects 2 arguments, 1 provided
  cout<< pow(int (2,a-1));
                        ^
In file included from /usr/include/c++/5/valarray:587:0,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:94,
                 from Main.cc:1:
/usr/include/c++/5/bits/valarray_after.h:544:1: note: candidate: template std::_Expr, typename _Dom::value_type> std::pow(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)
 _DEFINE_EXPR_BINARY_FUNCTION(pow, _Pow)
 ^
/usr/include/c++/5/bits/valarray_after.h:544:1: note:   template argument deduction/substitution failed:
Main.cc:8:24: note:   mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
  cout<< pow(int (2,a-1));
                        ^
In file included from /usr/include/c++/5/valarray:587:0,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:94,
                 from Main.cc:1:
/usr/include/c++/5/bits/valarray_after.h:544:1: note: candidate: template std::_Expr, typename _Dom::value_type> std::pow(const std::valarray&, const std::_Expr<_Dom1, typename _Dom1::value_type>&)
 _DEFINE_EXPR_BINARY_FUNCTION(pow, _Pow)
 ^
/usr/include/c++/5/bits/valarray_after.h:544:1: note:   template argument deduction/substitution failed:
Main.cc:8:24: note:   candidate expects 2 arguments, 1 provided
  cout<< pow(int (2,a-1));
                        ^
In file included from /usr/include/c++/5/valarray:587:0,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:94,
                 from Main.cc:1:
/usr/include/c++/5/bits/valarray_after.h:544:1: note: candidate: template std::_Expr, typename _Dom::value_type> std::pow(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::valarray&)
 _DEFINE_EXPR_BINARY_FUNCTION(pow, _Pow)
 ^
/usr/include/c++/5/bits/valarray_after.h:544:1: note:   template argument deduction/substitution failed:
Main.cc:8:24: note:   mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
  cout<< pow(int (2,a-1));
                        ^
In file included from /usr/include/c++/5/valarray:587:0,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:94,
                 from Main.cc:1:
/usr/include/c++/5/bits/valarray_after.h:544:1: note: candidate: template std::_Expr, typename _Dom1::value_type> std::pow(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::_Expr<_Dom2, typename _Dom2::value_type>&)
 _DEFINE_EXPR_BINARY_FUNCTION(pow, _Pow)
 ^
/usr/include/c++/5/bits/valarray_after.h:544:1: note:   template argument deduction/substitution failed:
Main.cc:8:24: note:   mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
  cout<< pow(int (2,a-1));
                        ^
In file included from /usr/include/c++/5/ccomplex:38:0,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/5/complex:1875:5: note: candidate: template std::complex::__type> std::pow(const std::complex<_Tp>&, const std::complex<_Up>&)
     pow(const std::complex<_Tp>& __x, const std::complex<_Up>& __y)
     ^
/usr/include/c++/5/complex:1875:5: note:   template argument deduction/substitution failed:
Main.cc:8:24: note:   mismatched types 'const std::complex<_Tp>' and 'int'
  cout<< pow(int (2,a-1));
                        ^
In file included from /usr/include/c++/5/ccomplex:38:0,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/5/complex:1867:5: note: candidate: template std::complex::__type> std::pow(const _Tp&, const std::complex<_Up>&)
     pow(const _Tp& __x, const std::complex<_Up>& __y)
     ^
/usr/include/c++/5/complex:1867:5: note:   template argument deduction/substitution failed:
Main.cc:8:24: note:   candidate expects 2 arguments, 1 provided
  cout<< pow(int (2,a-1));
                        ^
In file included from /usr/include/c++/5/ccomplex:38:0,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/5/complex:1859:5: note: candidate: template std::complex::__type> std::pow(const std::complex<_Tp>&, const _Up&)
     pow(const std::complex<_Tp>& __x, const _Up& __y)
     ^
/usr/include/c++/5/complex:1859:5: note:   template argument deduction/substitution failed:
Main.cc:8:24: note:   mismatched types 'const std::complex<_Tp>' and 'int'
  cout<< pow(int (2,a-1));
                        ^
In file included from /usr/include/c++/5/ccomplex:38:0,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/5/complex:1038:5: note: candidate: template std::complex<_Tp> std::pow(const _Tp&, const std::complex<_Tp>&)
     pow(const _Tp& __x, const complex<_Tp>& __y)
     ^
/usr/include/c++/5/complex:1038:5: note:   template argument deduction/substitution failed:
Main.cc:8:24: note:   candidate expects 2 arguments, 1 provided
  cout<< pow(int (2,a-1));
                        ^
In file included from /usr/include/c++/5/ccomplex:38:0,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/5/complex:1027:5: note: candidate: template std::complex<_Tp> std::pow(const std::complex<_Tp>&, const std::complex<_Tp>&)
     pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
     ^
/usr/include/c++/5/complex:1027:5: note:   template argument deduction/substitution failed:
Main.cc:8:24: note:   mismatched types 'const std::complex<_Tp>' and 'int'
  cout<< pow(int (2,a-1));
                        ^
In file included from /usr/include/c++/5/ccomplex:38:0,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/5/complex:993:5: note: candidate: template std::complex<_Tp> std::pow(const std::complex<_Tp>&, const _Tp&)
     pow(const complex<_Tp>& __x, const _Tp& __y)
     ^
/usr/include/c++/5/complex:993:5: note:   template argument deduction/substitution failed:
Main.cc:8:24: note:   mismatched types 'const std::complex<_Tp>' and 'int'
  cout<< pow(int (2,a-1));
                        ^
In file included from /usr/include/c++/5/ccomplex:38:0,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/5/complex:984:5: note: candidate: template std::complex<_Tp> std::pow(const std::complex<_Tp>&, int)
     pow(const complex<_Tp>& __z, int __n)
     ^
/usr/include/c++/5/complex:984:5: note:   template argument deduction/substitution failed:
Main.cc:8:24: note:   mismatched types 'const std::complex<_Tp>' and 'int'
  cout<< pow(int (2,a-1));
                        ^
In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:41:0,
                 from Main.cc:1:
/usr/include/c++/5/cmath:434:5: note: candidate: template constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type std::pow(_Tp, _Up)
     pow(_Tp __x, _Up __y)
     ^
/usr/include/c++/5/cmath:434:5: note:   template argument deduction/substitution failed:
Main.cc:8:24: note:   candidate expects 2 arguments, 1 provided
  cout<< pow(int (2,a-1));
                        ^
In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:41:0,
                 from Main.cc:1:
/usr/include/c++/5/cmath:411:3: note: candidate: constexpr long double std::pow(long double, long double)
   pow(long double __x, long double __y)
   ^
/usr/include/c++/5/cmath:411:3: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/5/cmath:407:3: note: candidate: constexpr float std::pow(float, float)
   pow(float __x, float __y)
   ^
/usr/include/c++/5/cmath:407:3: note:   candidate expects 2 arguments, 1 provided