Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void sherry()
- {
- #ifndef ONLINE_JUDGE
- freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
- #endif
- }
- int main()
- {
- sherry();
- long long n;
- cin >> n;
- long long arr[n];
- for (int i = 0; i < n; i++)
- {
- cin >> arr[i];
- }
- long long min = arr[0];
- int flag = 0;
- for (int s = 0; s < n; s++)
- {
- if (arr[s] <= min)
- {
- min = arr[s];
- }
- }
- cout << min << endl;
- for (int i = 0; i < n; i++)
- {
- if (arr[i] == min)
- {
- flag++;
- }
- }
- if ((min % 2 == 0) || (flag > 1))
- {
- cout << "Unlucky";
- }
- else
- {
- cout << "Lucky";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement