Tag Archives: gcd

Unfriendly Numbers: Hackerrank

Problem link: https://www.hackerrank.com/challenges/unfriendly-numbers

Problem Statement:
There is one friendly number and N unfriendly numbers. We want to find how many numbers are there which exactly divide the friendly number, but does not divide any of the unfriendly numbers.
Continue reading

Advertisements

Smallest multiple: Project Euler Problem 5

Problem link: http://projecteuler.net/problem=5

Problem Statement:
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.

What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?

Continue reading