실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In function ‘long long unsigned int findDiv(long long unsigned int)’: Main.cpp:58:20: error: call of overloaded ‘abs(long long unsigned int)’ is ambiguous 58 | g = GCD(abs(x - y), n); // 수정된 부분 | ~~~^~~~~~~ In file included from /usr/include/c++/11/bits/std_abs.h:38, from /usr/include/c++/11/cmath:47, from /usr/include/aarch64-linux-gnu/c++/11/bits/stdc++.h:41, from Main.cpp:1: /usr/include/stdlib.h:848:12: note: candidate: ‘int abs(int)’ 848 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; | ^~~ In file included from /usr/include/c++/11/cmath:47, from /usr/include/aarch64-linux-gnu/c++/11/bits/stdc++.h:41, from Main.cpp:1: /usr/include/c++/11/bits/std_abs.h:85:3: note: candidate: ‘constexpr __int128 std::abs(__int128)’ 85 | abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; } | ^~~ /usr/include/c++/11/bits/std_abs.h:79:3: note: candidate: ‘constexpr long double std::abs(long double)’ 79 | abs(long double __x) | ^~~ /usr/include/c++/11/bits/std_abs.h:75:3: note: candidate: ‘constexpr float std::abs(float)’ 75 | abs(float __x) | ^~~ /usr/include/c++/11/bits/std_abs.h:71:3: note: candidate: ‘constexpr double std::abs(double)’ 71 | abs(double __x) | ^~~ /usr/include/c++/11/bits/std_abs.h:61:3: note: candidate: ‘long long int std::abs(long long int)’ 61 | abs(long long __x) { return __builtin_llabs (__x); } | ^~~ /usr/include/c++/11/bits/std_abs.h:56:3: note: candidate: ‘long int std::abs(long int)’ 56 | abs(long __i) { return __builtin_labs(__i); } | ^~~ Main.cpp: In function ‘int main()’: Main.cpp:88:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 88 | for (int i = 1; i < List.size(); i++) | ~~^~~~~~~~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.