#include <stdio.h>

int main() {
    int list[4] = {457, 539, 743, 802};
    int k = 4;
    int n = 11;
    int low,high;
    low = 1;
    high = 802;
    int result = 0;

    while (low <= high) {
        int mid = (low + high) / 2;

        int count = 0;
        for (int i = 0; i < k; i++) {
            count += list[i] / mid;
        }

        if (count >= n) {
            result = mid;
            low = mid + 1;
        } else {
            high = mid - 1; 
        }
        
    }
    printf("%d",result);
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: