Sunteți pe pagina 1din 49

Convert hexadecimal numbers to their decimal representation

Solve English peg solitaire with backtracking (backtracking)

Compare chemical elements with the abstract data type Comparable


(interfaces)
Implement the periodic table of the chemical elements by loading the
elements values from a file
Design and implement chemical elements (objects)
Convert a given number of bytes into a representation with metric units (flow
control)
Calculate the electrical resistance of a wire (data types and expressions
Convert 16 bit Unicode into UTF-8 (data types and expressions)
Find the smalles distance between two neighbouring numbers in an array
(arrays)
Find the digit sum of a sequence of digits (arrays)
Winning strategy for Roulette (flow control)

Design and implement rational numbers (objects)


Find the day of the week of a given date (flow control)
Generate Sudokus (backtracking), 2
Design and implement a queue (interfaces)
Implement natural mergesort (sorting)
Implement Newton's method (searching)
Design and implement polynomials (objects)
Implement bottom-up mergesort (sorting)
Implement Shell sort (sorting)
Implement Euclids algorithm recursivly (recursion)
Find zeros of continueous functions (searching

Design and implement a class for wind speed (objects)


Implement a simple calculator (recursion)
Check for anagrams (arrays), 2
Calculate (german) grades for an examination (flow control)
Sort three numbers (flow control)
Print out the multiplication table for 1 to 10 (flow control)
Give a boolean expression for the definition of a metropolis (data types and
expressions)

algorithm:
Add the root node to an empty queue
while the queue is not empty:
Get a node from the queue
Print the item in the node
if node.left is not null:
add it to the queue
if node.right is not null:
add it to the queue

Write a subroutine that implements this algorithm, and write a program to test
the subroutine. Note that you will need a queue of TreeNodes,
so you will need to write a class to represent such queues.

program:
he characters +, *, and - will be used for the union, intersection, and difference
operations. The user of the program will type in lines of input containing two

sets, separated by an operator. The program should perform the operation and
print the resulting set. Here are some examples:

Input
------------------------[1, 2, 3] + [3, 5, 7]
[10,9,8,7] * [2,4,6,8]

Output
------------------[1, 2, 3, 5, 7]
[8]

[ 5, 10, 15, 20 ] - [ 0, 10, 20 ] [5, 15]

programs:

1
Add all the natural numbers below one thousand that are multiples of 3 or
5.

2
By considering the terms in the Fibonacci sequence whose values do not
exceed four million, find the sum of the even-valued terms.

3
Find the largest prime factor of a composite number.

4
Find the largest palindrome made from the product of two 3-digit numbers.

5
What is the smallest number divisible by each of the numbers 1 to 20?

6
What is the difference between the sum of the squares and the square of
the sums?

7
Find the 10001st prime.

8
Discover the largest product of five consecutive digits in the 1000-digit
number.

9
Find the only Pythagorean triplet, {a, b, c}, for which a + b + c = 1000.

10
Calculate the sum of all the primes below two million.

11
What is the greatest product of four adjacent numbers on the same
straight line in the 20 by 20 grid?

12
What is the value of the first triangle number to have over five hundred
divisors?

13
Find the first ten digits of the sum of one-hundred 50-digit numbers.

14
Find the longest sequence using a starting number under one million.

15
Starting in the top left corner in a 20 by 20 grid, how many routes are
there to the bottom right corner?

16
What is the sum of the digits of the number 21000?

17
How many letters would be needed to write all the numbers in words from
1 to 1000?

18
Find the maximum sum travelling from the top of the triangle to the base.

19
How many Sundays fell on the first of the month during the twentieth
century?

20
Find the sum of digits in 100!

21
Evaluate the sum of all amicable pairs under 10000.

22

What is the total of all the name scores in the file of first names?

23
Find the sum of all the positive integers which cannot be written as the
sum of two abundant numbers.

24
What is the millionth lexicographic permutation of the digits 0, 1, 2, 3, 4,
5, 6, 7, 8 and 9?

25
What is the first term in the Fibonacci sequence to contain 1000 digits?

26
Find the value of d < 1000 for which 1/d contains the longest recurring
cycle.

27
Find a quadratic formula that produces the maximum number of primes
for consecutive values of n.

28
What is the sum of both diagonals in a 1001 by 1001 spiral?

29
How many distinct terms are in the sequence generated by ab for 2 = a =
100 and 2 = b = 100?

30
Find the sum of all the numbers that can be written as the sum of fifth
powers of their digits.

31
Investigating combinations of English currency denominations.

32
Find the sum of all numbers that can be written as pandigital products.

33
Discover all the fractions with an unorthodox cancelling method.

34
Find the sum of all numbers which are equal to the sum of the factorial of
their digits.

35
How many circular primes are there below one million?

36
Find the sum of all numbers less than one million, which are palindromic in
base 10 and base 2.

37
Find the sum of all eleven primes that are both truncatable from left to
right and right to left.

38
What is the largest 1 to 9 pandigital that can be formed by multiplying a
fixed number by 1, 2, 3, ... ?

39

If p is the perimeter of a right angle triangle, {a, b, c}, which value, for p
= 1000, has the most solutions?

40
Finding the nth digit of the fractional part of the irrational number.

41
What is the largest n-digit pandigital prime that exists?

42
How many triangle words does the list of common English words contain?

43
Find the sum of all pandigital numbers with an unusual sub-string
divisibility property.

44
Find the smallest pair of pentagonal numbers whose sum and difference is
pentagonal.

45
After 40755, what is the next triangle number that is also pentagonal and
hexagonal?

46
What is the smallest odd composite that cannot be written as the sum of a
prime and twice a square?

47
Find the first four consecutive integers to have four distinct primes factors.

48
Find the last ten digits of 11 + 22 + ... + 10001000.

49
Find arithmetic sequences, made of prime terms, whose four digits are
permutations of each other.

50
Which prime, below one-million, can be written as the sum of the most
consecutive primes?

51
Find the smallest prime which, by changing the same part of the number,
can form eight different primes.

52
Find the smallest positive integer, x, such that 2x, 3x, 4x, 5x, and 6x,
contain the same digits in some order.

53
How many values of C(n,r), for 1 = n = 100, exceed one-million?

54
How many hands did player one win in the game of poker?

55
How many Lychrel numbers are there below ten-thousand?

56

Considering natural numbers of the form, ab, finding the maximum digital
sum.

57
Investigate the expansion of the continued fraction for the square root of
two.

58
Investigate the number of primes that lie on the diagonals of the spiral
grid.

59
Using a brute force attack, can you decrypt the cipher using XOR
encryption?

60
Find a set of five primes for which any two primes concatenate to produce
another prime.

61
Find the sum of the only set of six 4-digit figurate numbers with a cyclic
property.

62
Find the smallest cube for which exactly five permutations of its digits are
cube.

63
How many n-digit positive integers exist which are also an nth power?

64

How many continued fractions for N = 10000 have an odd period?

65
Find the sum of digits in the numerator of the 100th convergent of the
continued fraction for e.

66
Investigate the Diophantine equation x2 - Dy2 = 1.

67
Using an efficient algorithm find the maximal sum in the triangle?

68
What is the maximum 16-digit string for a "magic" 5-gon ring?

69
Find the value of n = 1,000,000 for which n/f(n) is a maximum.

70
Investigate values of n for which f(n) is a permutation of n.

71
Listing reduced proper fractions in ascending order of size.

72
How many elements would be contained in the set of reduced proper
fractions for d = 1,000,000?

73

How many fractions lie between 1/3 and 1/2 in a sorted set of reduced
proper fractions?

74
Determine the number of factorial chains that contain exactly sixty nonrepeating terms.

75
Find the number of different lengths of wire that can form a right angle
triangle in only one way.

76
How many different ways can one hundred be written as a sum of at least
two positive integers?

77
What is the first value which can be written as the sum of primes in over
five thousand different ways?

78
Investigating the number of ways in which coins can be separated into
piles.

79
By analysing a user's login attempts, can you determine the secret
numeric passcode?

80
Calculating the digital sum of the decimal digits of irrational square roots.

81

Find the minimal path sum from the top left to the bottom right by moving
right and down.

82
Find the minimal path sum from the left column to the right column.

83
Find the minimal path sum from the top left to the bottom right by moving
left, right, up, and down.

84
In the game, Monopoly, find the three most popular squares when using
two 4-sided dice.

85
Investigating the number of rectangles in a rectangular grid.

86
Exploring the shortest path from one corner of a cuboid to another.

87
Investigating numbers that can be expressed as the sum of a prime
square, cube, and fourth power?

88
Exploring minimal product-sum numbers for sets of different sizes.

89
Develop a method to express Roman numerals in minimal form.

90
An unexpected way of using two cubes to make a square.

91
Find the number of right angle triangles in the quadrant.

92
Investigating a square digits number chain with a surprising property.

93
Using four distinct digits and the rules of arithmetic, find the longest
sequence of target numbers.

94
Investigating almost equilateral triangles with integral sides and area.

95
Find the smallest member of the longest amicable chain with no element
exceeding one million.

96
Devise an algorithm for solving Su Doku puzzles.

97
Find the last ten digits of the non-Mersenne prime: 28433 27830457 +
1.

98
Investigating words, and their anagrams, which can represent square
numbers.

99
Which base/exponent pair in the file has the greatest numerical value?

100
Finding the number of blue discs for which there is 50% chance of taking
two blue.

101
Investigate the optimum polynomial function to model the first k terms of
a given sequence.

102
For how many triangles in the text file does the interior contain the origin?

103
Investigating sets with a special subset sum property.

104
Finding Fibonacci numbers for which the first and last nine digits are
pandigital.

105
Find the sum of the special sum sets in the file.

106
Find the minimum number of comparisons needed to identify special sum
sets.

107
Determining the most efficient way to connect the network.

108
Solving the Diophantine equation 1/x + 1/y = 1/n.

109
How many distinct ways can a player checkout in the game of darts with a
score of less than 100?

110
Find an efficient algorithm to analyse the number of solutions of the
equation 1/x + 1/y = 1/n.

111
Search for 10-digit primes containing the maximum number of repeated
digits.

112
Investigating the density of "bouncy" numbers.

113
How many numbers below a googol (10100) are not "bouncy"?

114
Investigating the number of ways to fill a row with separated blocks that
are at least three units long.

115

Finding a generalisation for the number of ways to fill a row with separated
blocks.

116
Investigating the number of ways of replacing square tiles with one of
three coloured tiles.

117
Investigating the number of ways of tiling a row using different-sized tiles.

118
Exploring the number of ways in which sets containing prime elements can
be made.

119
Investigating the numbers which are equal to sum of their digits raised to
some power.

120
Finding the maximum remainder when (a - 1)n + (a + 1)n is divided by a2.

121
Investigate the game of chance involving coloured discs.

122
Finding the most efficient exponentiation method.

123
Determining the remainder when (pn - 1)n + (pn + 1)n is divided by pn2.

124
Determining the kth element of the sorted radical function.

125
Finding square sums that are palindromic.

126
Exploring the number of cubes required to cover every visible face on a
cuboid.

127
Investigating the number of abc-hits below a given limit.

128
Which tiles in the hexagonal arrangement have prime differences with
neighbours?

129
Investigating minimal repunits that divide by n.

130
Finding composite values, n, for which n-1 is divisible by the length of the
smallest repunits that divide it.

131
Determining primes, p, for which n3 + n2p is a perfect cube.

132
Determining the first forty prime factors of a very large repunit.

133
Investigating which primes will never divide a repunit containing 10n
digits.

134
Finding the smallest positive integer related to any pair of consecutive
primes.

135
Determining the number of solutions of the equation x2 - y2 - z2 = n.

136
Discover when the equation x2 - y2 - z2 = n has a unique solution.

137
Determining the value of infinite polynomial series for which the
coefficients are Fibonacci numbers.

138
Investigating isosceles triangle for which the height and base length differ
by one.

139
Finding Pythagorean triangles which allow the square on the hypotenuse
to be tiled.

140
Investigating the value of infinite polynomial series for which the
coefficients are a linear second order recurrence relation.

141
Investigating progressive numbers, n, which are also square.

142
Perfect Square Collection

143
Investigating the Torricelli point of a triangle

144
Investigating multiple reflections of a laser beam.

145
How many reversible numbers are there below one-billion?

146
Investigating a Prime Pattern

147
Rectangles in cross-hatched grids

148
Exploring Pascal's triangle.

149
Searching for a maximum-sum subsequence.

150

Searching a triangular array for a sub-triangle having minimum-sum.

151
Paper sheets of standard sizes: an expected-value problem.

152
Writing 1/2 as a sum of inverse squares

153
Investigating Gaussian Integers

154
Exploring Pascal's pyramid.

155
Counting Capacitor Circuits.

156
Counting Digits

157
Solving the diophantine equation 1/a+1/b= p/10n

158

Exploring strings for which only one character comes lexicographically


after its neighbour to the left.

159
Digital root sums of factorisations.

160
Factorial trailing digits

161
Triominoes

162
Hexadecimal numbers

163
Cross-hatched triangles

164
Numbers for which no three consecutive digits have a sum greater than a
given value.

165
Intersections

166
Criss Cross

167

Investigating Ulam sequences

168
Number Rotations

169
Exploring the number of different ways a number can be expressed as a
sum of powers of 2.

170
Find the largest 0 to 9 pandigital that can be formed by concatenating
products.

171
Finding numbers for which the sum of the squares of the digits is a square.

172
Investigating numbers with few repeated digits.

173
Using up to one million tiles how many different "hollow" square laminae
can be formed?

174
Counting the number of "hollow" square laminae that can form one, two,
three, ... distinct arrangements.

175
Fractions involving the number of different ways a number can be
expressed as a sum of powers of 2.

176
Rectangular triangles that share a cathetus.

177
Integer angled Quadrilaterals.

178
Step Numbers

179
Consecutive positive divisors

180
Rational zeros of a function of three variables.

181
Investigating in how many ways objects of two different colours can be
grouped.

182
RSA encryption

183
Maximum product of parts

184
Triangles containing the origin.

185
Number Mind

186
Connectedness of a network.

187
Semiprimes

188
The hyperexponentiation of a number

189
Tri-colouring a triangular grid

190
Maximising a weighted product

191
Prize Strings

192
Best Approximations

193
Squarefree Numbers

194

Coloured Configurations

195
Inscribed circles of triangles with one angle of 60 degrees

196
Prime triplets

197
Investigating the behaviour of a recursively defined sequence

198
Ambiguous Numbers

199
Iterative Circle Packing

200
Find the 200th prime-proof sqube containing the contiguous sub-string
"200"

201
Subsets with a unique sum
1040

202
Laserbeam
1213
203
Squarefree Binomial Coefficients
4409
204
Generalised Hamming Numbers
3617
205
Dice Game
6897
206
Concealed Square
9893
207
Integer partition equations
2445
208
Robot Walks
859
209
Circular Logic
1280
210
Obtuse Angled Triangles
848
211

Divisor Square Sum


1802
212
Combined Volume of Cuboids
747
213
Flea Circus
1103
214
Totient Chains
2533
215
Crack-free Walls
1847
216
Investigating the primality of numbers of the form 2n2-1
1943
217
Balanced Numbers
751
218
Perfect right-angled triangles
1485
219
Skew-cost coding
777
220
Heighway Dragon

1292
221
Alexandrian Integers
1030
222
Sphere Packing
1080
223
Almost right-angled triangles I
705
224
Almost right-angled triangles II
602
225
Tribonacci non-divisors
2133
226
A Scoop of Blancmange
948
227
The Chase
987
228
Minkowski Sums
745
229
Four Representations using Squares
744

230
Fibonacci Words
1576
231
The prime factorisation of binomial coefficients
2694
232
The Race
887
233
Lattice points on a circle
812
234
Semidivisible numbers
1803
235
An Arithmetic Geometric sequence
2728
236
Luxury Hampers
535
237
Tours on a 4 x n playing board
803
238
Infinite string tour
560
239

Twenty-two Foolish Primes


946
240
Top Dice
1146
241
Perfection Quotients
506
242
Odd Triplets
575
243
Resilience
3195
244
Sliders
693
245
Coresilience
464
246
Tangents to an ellipse
466
247
Squares under a hyperbola
796
248
Numbers for which Eulers totient function equals 13!

655
249
Prime Subset Sums
1148
250
250250

251
Cardano Triplets
671
252
Convex Holes
516
253
Tidying up
526
254
Sums of Digit Factorials
542
255
Rounded Square Roots
512

256
Tatami-Free Rooms
432
257
Angular Bisectors
398
258
A lagged Fibonacci sequence
722
259
Reachable Numbers
727
260
Stone Game
688
261
Pivotal Square Sums
395
262
Mountain Range.
440
263
An engineers' dream come true
565
264
Triangle Centres
374
265

Binary Circles
2031
266
Pseudo Square Root
787
267
Billionaire
1457
268
Counting numbers with at least four distinct prime factors less than 100
712
269
Polynomials with at least one integer root
403
270
Cutting Squares
409
271
Modular Cubes, part 1
1027
272
Modular Cubes, part 2
459
273
Sum of Squares
675
274
Divisibility Multipliers

782
275
Balanced Sculptures
390
276
Primitive Triangles
559
277
A Modified Collatz sequence
1495
278
Linear Combinations of Semiprimes
517
279
Triangles with integral sides and an integral angle
401
280
Ant and seeds
530
281
Pizza Toppings
475
282
The Ackermann function
523
283
Integer sided triangles for which the area/perimeter ratio is integral.
402

284
Steady Squares
656
285
Pythagorean odds
619
286
Scoring probabilities
952
287
Quadtree encoding (a simple compression algorithm)
715
288
An enormous factorial
607
289
Eulerian Cycles
330
290
Digital Signature
531
291
Panaitopol Primes
632
292
Pythagorean Polygons
373
293

Pseudo-Fortunate Numbers
1137
294
Sum of digits - experience #23
472
295
Lenticular holes
331
296
Angular Bisector and Tangent
357
297
Zeckendorf Representation
1336
298
Selective Amnesia
396
299
Three similar triangles
397
300
Protein folding

301
Nim

2186
302
Strong Achilles Numbers
392
303
Multiples with small digits
1592
304
Primonacci
875
305
Reflexive Position
383
306
Paper-strip Game
560
307
Chip Defects
701
308
An amazing Prime-generating Automaton
432
309
Integer Ladders
406
310
Nim Square
483

311
Biclinic Integral Quadrilaterals
280
312
Cyclic paths on Sierpinski graphs
432
313
Sliding game
603
314
The Mouse on the Moon
303
315
Digital root clocks
1084
316
Numbers in decimal expansions
355
317
Firecracker
982
318
2011 nines
445
319
Bounded Sequences
249
320

Factorials divisible by a huge integer


384
321
Swapping Counters
711
322
Binomial coefficients divisible by 10
270
323
Bitwise-OR operations on random integers
1221
324
Building a tower
340
325
Stone Game II
300
326
Modulo Summations
301
327
Rooms of Doom
534
328
Lowest-cost Search
242
329
Prime Frog

862
330
Euler's Number
287
331
Cross flips
221
332
Spherical triangles
327
333
Special partitions
491
334
Spilling the beans
270
335
Gathering the beans
267
336
Maximix Arrangements
655
337
Totient Stairstep Sequences
272
338
Cutting Rectangular Grid Paper
220

339
Peredur fab Efrawg
306
340
Crazy Function
412
341
Golomb's self-describing sequence
464
342
The totient of a square is a cube
388
343
Fractional Sequences
677
344
Silver dollar game
143
345
Matrix Sum
1406
346
Strong Repunits
1004
347
Largest integer divisible by two primes
994
348

Sum of a square and a cube


867
349
Langton's ant
736
350
Constraining the least greatest and the greatest least

351
Hexagonal orchards
895
352
Blood tests
308
353
Risky moon
252
354
Distances in a bee's honeycomb
199
355
Maximal coprime subset
292
356
Largest roots of cubic polynomials
280

357
Prime generating integers
1747
358
Cyclic numbers
621
359
Hilbert's New Hotel
568
360
Scary Sphere
354
361
Subsequence of Thue-Morse sequence
140
362
Squarefree factors
251
363
Bzier Curves
442
364
Comfortable distance
331
365
A huge binomial coefficient
436
366

Stone Game III


302
367
bozo sort
213
368
A Kempner-like series
301
369
Badugi
267
370
Geometric triangles
285
371
Licence plates
532
372
Pencils of rays
256
373
Circumscribed Circles
226
374
Maximum Integer Partition Product
313
375
Minimum of subsequences

366
376
Nontransitive sets of dice
165
377
Sum of digits, experience 13
307
378
Triangle Triples
328
379
Least common multiple count
230
380
Amazing Mazes!
262
381
(prime-k) factorial
1041
382
Generating polygons
204
383
Divisibility comparison between factorials
262
384
Rudin-Shapiro sequence
212

385
Ellipses inside triangles
163
386
Maximum length of an antichain
313
387
Harshad Numbers
743
388
Distinct Lines
262
389
Platonic Dice
527
390
Triangles with non rational sides and integral area
332
391
Hopping Game
152
392
Enmeshed unit circle
248
393
Migrating ants
287
394

Eating pie
220
395
Pythagorean tree
268
396
Weak Goodstein sequence
234
397
Triangle on parabola
115
398
Cutting rope
167
399
Squarefree Fibonacci Numbers
225
400
Fibonacci tree game

401
Sum of squares of divisors
355
402
Integer-valued polynomials
95

403
Lattice points enclosed by parabola and line

S-ar putea să vă placă și