diff --git a/Luogu/P4549/P4549.cpp b/Luogu/P4549/P4549.cpp new file mode 100644 index 00000000..563fa05a --- /dev/null +++ b/Luogu/P4549/P4549.cpp @@ -0,0 +1,26 @@ +#include +#include +#include + +using std::cin; +using std::cout; +const char endl = '\n'; + +int n, ans; + +int main() { + std::ios::sync_with_stdio(false); + cin.tie(nullptr); + + cin >> n; + + for (int i = 1, x; i <= n; i++) { + cin >> x; + + ans = std::experimental::gcd(ans, std::abs(x)); + } + + cout << ans << endl; + + return 0; +}