Top Topics in our Forum';
**Create your own pie chart with ChartMaker

A+    A−    B  
Algebra
Games
Geometry
Interactive
Trigonometry
Forum




AddThis Social Bookmark Button

Hex Numbers Project

Related Project: Problem 162 from Project Euler

Problem 162

This problem is inspired by a problem from Project Euler and is reproduced s for my Advanced Placement Computer Science students. To receive credit for this assignment, students must corectly answer the problem as well as email me the Java Code that solved the problem. The actual problem

In the hexadecimal number system numbers are represented using 16 different digits:

0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F

The hexadecimal number AF when written in the decimal number system equals 10x16+15=175.

In the 3-digit hexadecimal numbers 10A, 1A0, A10, and A01 the digits 0,1 and A are all present.
Like numbers written in base ten we write hexadecimal numbers without leading zeroes.

Problem to solve

How many hexadecimal numbers containing 3, 4 or 5 digits exist with all of the digits 0,1, and A present at least once? For this assignment you must store each of the numbers in an ArrayList. Your program should print out the final list of numbers. You can use the .size() of the ArrayList to figure out how many hex numbers satisfy this condition.


Top