Menu
Coddy logo textTech

Divisors

Lesson 32 of 32 in Coddy's Coding Problems course.

challenge icon

Challenge

Hard

Write a program that will calculate how many divisors a number has, so that in a given range you output the number with most divisors. If there are more numbers with the same amount of divisors, output the smallest of the more numbers

 

Input
1 10

Output
6 4

Input
10 20

Output
12 6

Try it yourself

#include <stdio.h>

int main() {
    // Write code here
    return 0;
}

All lessons in Coding Problems