From 2e465457b6b11899a6e2423ce0d4a114efe7d5f4 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sun, 7 Aug 2022 14:35:17 +0800 Subject: [PATCH] =?UTF-8?q?T258418=20[Aya=20Round=201=20D]=20=E6=96=87?= =?UTF-8?q?=E6=96=87=E7=9A=84=E6=95=B0=E5=AD=A6=E6=B8=B8=E6=88=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.luogu.com.cn/record/82796877 --- Luogu/T258418/T258418.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Luogu/T258418/T258418.cpp 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; +}