Submission #65005
ソースコード
ステータス
コンパイルメッセージ
./Main.cpp: In function ‘int main()’:
./Main.cpp:10:41: error: no matching function for call to ‘__gcd(long long int&, int)’
else ans = __gcd(ans, abs(a - i + 1));
^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/algorithm:62,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:65,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algo.h:1232:5: note: candidate: ‘template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)’
__gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
^~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algo.h:1232:5: note: template argument deduction/substitution failed:
./Main.cpp:10:41: note: deduced conflicting types for parameter ‘_EuclideanRingElement’ (‘long long int’ and ‘int’)
else ans = __gcd(ans, abs(a - i + 1));
^
セット
テストケース