diff --git a/Luogu/T258418/T258418.cpp b/Luogu/T258418/T258418.cpp new file mode 100644 index 00000000..9a284c66 --- /dev/null +++ b/Luogu/T258418/T258418.cpp @@ -0,0 +1,33 @@ +#include +#include +#include + +using std::cin; +using std::cout; +const char endl = '\n'; + +const int N = 1e5 + 5; +const int mod = 1e9 + 7; + +int n, a[N], ans = 1; + +int main() { + std::ios::sync_with_stdio(false); + cin.tie(nullptr); + + cin >> n; + + for (int i = 1; i <= n; i++) { + cin >> a[i]; + } + + int min = *std::min_element(a + 1, a + n + 1); + + for (int i = 1; i <= n; i++) { + ans = (static_cast(ans) * static_cast(std::floor(static_cast(a[i]) / min))) % mod; + } + + cout << min << ' ' << ans << endl; + + return 0; +}