UVa 10036

From Algorithmist
Jump to navigation Jump to search

10036 - Divisibility[edit]

Summary[edit]

Write a program that will determine divisibility of sequence of integers.

Explanation[edit]

Dynamic Programming

Input[edit]

7
4 7
17 5 -21 15
4 5
17 5 -21 15
10 30
9 -97 3 5 -1 0 11 -46 19 17
10 97
9 -97 3 5 -1 0 11 -46 19 17
12 16
-11 7 -73 40 5 -2 66 21 -64 16 16 16
5 15
-1 -2 -3 -4 -5
5 9
-5 -4 2 -2 0

Output[edit]

Divisible
Not divisible
Divisible
Not divisible
Not divisible
Divisible
Divisible 

Solutions[edit]