0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-24 00:08:47 +00:00

T258418 [Aya Round 1 D] 文文的数学游戏

https://www.luogu.com.cn/record/82796877
This commit is contained in:
Baoshuo Ren 2022-08-07 14:35:17 +08:00
parent dd86807035
commit 2e465457b6
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

33
Luogu/T258418/T258418.cpp Normal file
View File

@ -0,0 +1,33 @@
#include <iostream>
#include <algorithm>
#include <cmath>
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<long long>(ans) * static_cast<long long>(std::floor(static_cast<double>(a[i]) / min))) % mod;
}
cout << min << ' ' << ans << endl;
return 0;
}