Posts

Showing posts with the label python

Zopper Programming assignment Question 3 (Project Group)

The third question is also a simple one: Link to the question is on HackerRank:  http://www.hackerearth.com/problem/algorithm/project-team/ The submission code in python can be seen here:

Zopper online assesment question on HackerEarth with solution.

Recently a friend asked me to solve a problem which he got on one of the interview, online assessment test. I decided to document my solution here. The companies name was Zopper and the question was asked on the initial online screening test on HackerEarth. Problem: HackerMan says that 5 and 8 are smart digits. A positive integer is called a smart number if it has only smart digits in its decimal representation. HackerMan has three sets of numbers. And he needs your help to find out the number of distinct smart numbers that he can make using one number from each of the three sets. You have to help in it Note:  You must not count the same smart number more than once. Constraints The three sets will contain between 1 and 50 elements, inclusive. Each number in the three sets will contain numbers between 1 and 30,000, inclusive. Input Format The first, third and fifth lines will contain a number N that will specify the count of numbers in the sets on the second, fou...

Setting up development environment on Mac with Python and Virtual Environment.

Install virtual environment. pip install virtualenv Create a virtual environment. virtualenv venv Activate your virtual environment. source venv/bin/activate Deactivate your virtual environment. deactivate