Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int mn_mul = 1000001;
- int mn = 1001;
- int n, i;
- cin >> n;
- int a[7];
- for (i = 0; i < 6; i++)
- cin >> a[i % 7];
- for (i = 6; i < n; i++) {
- cin >> a[i % 7];
- if (a[(i-6) % 7] < mn)
- mn = a[(i-6) % 7];
- if (a[i % 7] * mn < mn_mul)
- mn_mul = a[i % 7] * mn;
- }
- cout << mn_mul << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement