# 1400 & 1620

## Details

Must be enrolled in CSCI-1400 or CSCI-1620 to compete.
Two brackets: One for CSCI-1400 students and one for CSCI-1620 students.

7 Problems for each bracket.

Solve problems by writing code.

Compete as an individual.

Internet access is allowed.

Problems involve topics discussed in class.

Program in Java, C, C++, Python, or Ruby

## Prizes

The top 3 participants in each bracket of the contest will receive 1 month paid access to PluralSight.
Each bracket will also have the following prizes.

In PKI Room 260

## Agenda

12pm to 12:30pm: Setup and contest overview presentation

12:30 pm to 1pm: Practice Round

1pm to 5pm: Programming Contest

## Sample Problem - The Chocolate Bar

Description:

Everyone has had one of those days where they need something to brighten their mood. This “something” can range from a moment of peace and quiet to a copious amount of video games. In other cases, something sweet might be considered – a chocolate bar for example. These bars have a tendency to be divided into squares, making the sharing of these treats much easier. Suppose you come across a group of people that also look like they could lighten up. We’re interested in calculating how many times a chocolate bar must be broken in order for every individual to receive an equal share.

Input:

The first line will be an integer N (0<N<20000) stating the number of test cases, followed by a newline. Every line following the first line is a test case. Each test case will consist of a single integer describing how many people (including yourself) are in a group, followed by a newline. Assume there is only one chocolate bar. Also assume it is possible to break this chocolate bar into equal-sized pieces of any size.

Output:

Print the number of times the chocolate bar must be broken (or split) in order to provide each individual with a fair share of chocolate. The format is as follows: Case #i: b. Where i is the current test case and b is the number of breaks required for that test case. Each test case should be printed on a separate line in the order that the input appears.

Sample Input

3

10

47

35

Sample Output

Case #1: 9

Case #2: 46

Case #3: 34

## Registration

You can register early here. This is appreciated, but not required.

## UNO ACM

Contest Creators and Judges