Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
5949 | 高振轩 | 求两个数较大的数 | C++ | Compile Error | 0 MS | 0 KB | 104 | 2024-12-21 14:50:10 |
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<fabs(a,b); }
Main.cc: In function 'int main()': Main.cc:6:16: error: no matching function for call to 'fabs(int&, int&)' cout _Tp std::fabs(const std::complex<_Tp>&) fabs(const std::complex<_Tp>& __z) ^ /usr/include/c++/4.8.2/complex:1818:5: note: template argument deduction/substitution failed: Main.cc:6:16: note: mismatched types 'const std::complex<_Tp>' and 'int' cout constexpr typename __gnu_cxx::__enable_if::__value, double>::__type std::fabs(_Tp) fabs(_Tp __x) ^ /usr/include/c++/4.8.2/cmath:272:5: note: template argument deduction/substitution failed: Main.cc:6:16: note: candidate expects 1 argument, 2 provided cout<fabs(a,b); ^ In file included from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/stdc++.h:41:0, from Main.cc:1: /usr/include/c++/4.8.2/cmath:264:3: note: constexpr long double std::fabs(long double) fabs(long double __x) ^ /usr/include/c++/4.8.2/cmath:264:3: note: candidate expects 1 argument, 2 provided /usr/include/c++/4.8.2/cmath:260:3: note: constexpr float std::fabs(float) fabs(float __x) ^ /usr/include/c++/4.8.2/cmath:260:3: note: candidate expects 1 argument, 2 provided