func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 500 + 1;   int a[maxn], n;   bool check(int r) {     for (int i = 1; i <= n; i++)       if (a[i] % r > 0 && r - 1 - a[i] % r > a[i] / r) return 0;     return 1;   }   long long calc(int r) {     long long res = 0;     for (int i = 1; i <= n; i++) res += a[i] / r + (a[i] % r != 0);     return res;   }   int main() {     ios::sync_with_stdio(false);     cin >> n;     for (int i = 1; i <= n; i++) cin >> a[i];     int res = 1;     for (int i = 1, j, m = a[1]; i <= m; i = j + 1) {       int t = m / i;       j = m / t;       if (check(t + 1)) {         res = t + 1;         break;       }       if (check(t)) {         res = t;         break;       }     }     cout << calc(res);     return 0;   }   