# kakuro - sum up to the goal The Input Input will begin with...

This preview shows page 1. Sign up to view the full content.

Kakuro Konundrum Filename: kakuro Much like any pair of brothers, Timmy’s older brother picks on him a lot. Recently, Timmy was pushed into a closet with a flashlight, a pen and a puzzle. Timmy’s brother will not let him out of the closet until the puzzle is solved. Unfortunately, Timmy has never seen this kind of puzzle before. It requires a set of three positive single digits to sum to a target and each digit must be unique. Timmy needs your help so his brother will let him out! The Problem: Given a goal sum and three positive digits, determine if the three positive digits are unique and
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: sum up to the goal. The Input: Input will begin with a single, positive integer, n, on a line by itself. On the next n lines will be a single positive integer representing the goal sum followed by three single positive digits, each separated by a single space. The Output: For each line of input, determine if the three digits sum to the goal and are unique. Output “ Proper triplet ” on a line by itself if so, or “ Not a good triplet ” on a line by itself if not. Sample Input: 3 19 4 7 8 10 1 9 6 14 3 8 3 Sample Output: Proper triplet Not a good triplet Not a good triplet...
View Full Document

## This note was uploaded on 06/09/2011 for the course COP 3223 taught by Professor Guha during the Spring '08 term at University of Central Florida.

Ask a homework question - tutors are online