Submission

Status:
[PPP][P-S][-SS][-SS][-SS]

Score: 20

User: Cmoss9

Problemset: สมดุลย์ชีวิต

Language: cpp

Time: 0.008 second

Submitted On: 2025-03-30 15:29:56

#include <bits/stdc++.h>
using namespace std;
int main () {
    ios_base::sync_with_stdio(0); cin.tie(0);
    int n; cin >> n;
    int count = 0;
    for (int i = 0;i<n;i++) {
        int work;
        cin >> work;
        if (work >= 18) {
            count++;
        }
    }
    int mindays = n + max(0,2*count - n -1);
    cout << mindays;
}